Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 10 pull requests #100793

Merged
merged 23 commits into from
Aug 20, 2022
Merged

Rollup of 10 pull requests #100793

merged 23 commits into from
Aug 20, 2022

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

compiler-errors and others added 23 commits August 14, 2022 20:23
…dead

Mention `as_mut` alongside `as_ref` in borrowck error message

Kinda fixes rust-lang#99426 but I guess that really might be better staying open to see if we could make it suggest `as_mut` in a structured way. Not sure how to change borrowck to know that info tho.
…on, r=cuviper

Mitigate stale data reads on SGX platform

Intel disclosed the Stale Data Read vulnerability yesterday. In order to mitigate this issue completely, reading userspace from an SGX enclave must be aligned and in 8-bytes chunks. This PR implements this mitigation

References:
 - https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00657.html
 - https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/advisory-guidance/stale-data-read-from-xapic.html

cc: ``@jethrogb``
…er-errors

suggest `once_cell::Lazy` for non-const statics

Addresses rust-lang#100410

Some questions:
 - removing the `if` seems to include too many cases (e.g. calls to non-const functions inside a `const fn`), but this code excludes the following case:
```rust
const FOO: Foo = non_const_fn();
```
Should we suggest `once_cell` in this case as well?
 - The original issue mentions suggesting `AtomicI32` instead of `Mutex<i32>`, should this PR address that as well?
…errors

Suggest the right help message for as_ref

Fixes rust-lang#100605
…=davidtwco

Migrate "invalid variable declaration" errors to SessionDiagnostic

After seeing the great blog post on Inside Rust, I decided to try my hand at this. Just one diagnostic for now to get used to the workflow and to check if this is the way to do it or if there are any problems.
…bol-diagnostic, r=compiler-errors

Migrate typeck's `used` expected symbol diagnostic to `SessionDiagnostic`

r? ``@davidtwco``
…errors

Add the diagnostic translation lints to crates that don't emit them

Some of these have a note saying that they should build on a stable compiler, does that mean they shouldn't get these lints? Or can we cfg them out on those?
…nton

Avoid zeroing a 1kb stack buffer on every call to `std::sys::windows::fill_utf16_buf`

I've also tried to be slightly more careful about integer overflows, although in practice this is likely still not handled ideally.

r? `@ChrisDenton`
…-function-qual-error, r=davidtwco

improved diagnostic for function defined with `def`, `fun`, `func`, or `function` instead of `fn`

Closes rust-lang#99751
@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Aug 20, 2022
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Aug 20, 2022

📌 Commit 60edec9 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 20, 2022
@bors
Copy link
Contributor

bors commented Aug 20, 2022

⌛ Testing commit 60edec9 with merge 36e530c...

@bors
Copy link
Contributor

bors commented Aug 20, 2022

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 36e530c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 20, 2022
@bors bors merged commit 36e530c into rust-lang:master Aug 20, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 20, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (36e530c): comparison url.

Instruction count

  • Primary benchmarks: ✅ relevant improvement found
  • Secondary benchmarks: ❌ relevant regressions found
mean1 max count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.3% 0.3% 2
Improvements ✅
(primary)
-0.9% -0.9% 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.9% -0.9% 1

Max RSS (memory usage)

Results
  • Primary benchmarks: ❌ relevant regression found
  • Secondary benchmarks: ✅ relevant improvement found
mean1 max count2
Regressions ❌
(primary)
2.3% 2.3% 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.2% -3.2% 1
All ❌✅ (primary) 2.3% 2.3% 1

Cycles

Results
  • Primary benchmarks: mixed results
  • Secondary benchmarks: ❌ relevant regression found
mean1 max count2
Regressions ❌
(primary)
3.4% 3.4% 1
Regressions ❌
(secondary)
2.9% 2.9% 1
Improvements ✅
(primary)
-3.3% -3.3% 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% 3.4% 2

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@davidtwco davidtwco removed the A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic label Oct 4, 2022
@matthiaskrgr matthiaskrgr deleted the rollup-dy7rfdh branch October 9, 2022 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.