-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 7 pull requests #101361
Rollup of 7 pull requests #101361
Conversation
Previously we were just using the parent node as the scope for a temporary value, but it turns out this is too narrow. For example, in an expression like Foo { b: &42, a: async { 0 }.await, } the scope for the &42 was set to the ExprField node for `b: &42`, when we actually want to use the Foo struct expression. We fix this by recursively searching through parent nodes until we find a Node::Expr. It may be that we don't find one, and if so that's okay, we will just fall back on the enclosing temporary scope which is always sufficient.
revealed by tests, manually add a panic to test for dead code
…ossible... - ... when creating diagnostics in rustc_metadata - use the error_code! macro - pass macro output to diag.code() - use fluent from within manual implementation of SessionDiagnostic - emit the untested errors in case they occur in the wild - stop panicking in the probably-not-dead code, add fixme to write test
Also briefly document the history of `sys/windows/rand.rs` as they may be relevant to any future changes.
Fuchsia .manifest files do not support a `#` comment syntax. Because of this, if you copy and paste the current example code for this file, and then remove the line you don't need, you still see an error. To make this a bit easier to follow, split this into two code blocks, one for rustc, and one for cargo.
…partial-stabilization-bounds-as-ref, r=dtolnay Partially stabilize `bound_as_ref` by stabilizing `Bound::as_ref` Stabilizing `Bound::as_ref` will simplify the implementation for `RangeBounds<usize>` for custom range types: ```rust impl RangeBounds<usize> for Region { fn start_bound(&self) -> Bound<&usize> { // TODO: Use `self.start.as_ref()` when upstream `std` stabilizes: // rust-lang#80996 match self.start { Bound::Included(ref bound) => Bound::Included(bound), Bound::Excluded(ref bound) => Bound::Excluded(bound), Bound::Unbounded => Bound::Unbounded, } } fn end_bound(&self) -> Bound<&usize> { // TODO: Use `self.end.as_ref()` when upstream `std` stabilizes: // rust-lang#80996 match self.end { Bound::Included(ref bound) => Bound::Included(bound), Bound::Excluded(ref bound) => Bound::Excluded(bound), Bound::Unbounded => Bound::Unbounded, } } } ``` See: - rust-lang#80996 - rust-lang#80996 (comment) cc `@yaahc` who suggested partial stabilization.
…s, r=davidtwco Migrate rustc_metadata to SessionDiagnostics Migrate rustc_metadata to SessionDiagnostics. Part of rust-lang#100717
[drop tracking] Use parent expression for scope, not parent node Previously we were just using the parent node as the scope for a temporary value, but it turns out this is too narrow. For example, in an expression like Foo { b: &42, a: async { 0 }.await, } the scope for the &42 was set to the ExprField node for `b: &42`, when we actually want to use the Foo struct expression. We fix this by recursively searching through parent nodes until we find a Node::Expr. It may be that we don't find one, and if so that's okay, we will just fall back on the enclosing temporary scope which is always sufficient. Helps with rust-lang#97331 r? ``@jyn514``
… r=thomcc Windows RNG: Use `BCRYPT_RNG_ALG_HANDLE` by default This only changes a small amount of actual code, the rest is documentation outlining the history of this module as I feel it will be relevant to any future issues that might crop up. The code change is to use the `BCRYPT_RNG_ALG_HANDLE` [pseudo-handle](https://docs.microsoft.com/en-us/windows/win32/seccng/cng-algorithm-pseudo-handles) by default, which simply uses the default RNG. Previously we used `BCRYPT_USE_SYSTEM_PREFERRED_RNG` which has to load the system configuration and then find and load that RNG. I suspect this was the cause of failures on some systems (e.g. due to corrupted config). However, this is admittedly speculation as I can't reproduce the issue myself (and it does seem quite rare even in the wild). Still, removing a possible point of failure is likely worthwhile in any case. r? libs
…n514 Fix `std::collections::HashSet::drain` documentation Hi! `std::collections::HashSet::drain` contains small typo in the docstring. I didn't read too much about the model of contributing to Rust, so merge this PR or close and fix the typo the right way :) Thanks for Rust!
Fix unsupported syntax in .manifest file Fuchsia .manifest files do not support a `#` comment syntax. Because of this, if you copy and paste the current example code for this file, and then remove the line you don't need, you still see an error. To make this a bit easier to follow, split this into two code blocks, one for rustc, and one for cargo.
…r=notriddle Cleanup css theme Follow-up of rust-lang#100494. The change for the border color of the search input in the dark mode was actually a weird case: the search input border was unique, it didn't share the same variable with other items with borders. This weird case being unique to the dark theme, I removed it, hence the modification in the GUI test. Live demo is [here](https://rustdoc.crud.net/imperio/cleanup-css-theme/std/index.html). cc `@jsha` r? `@notriddle`
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: 0421444f8f In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (9208625): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
Successful merges:
bound_as_ref
by stabilizingBound::as_ref
#99736 (Partially stabilizebound_as_ref
by stabilizingBound::as_ref
)BCRYPT_RNG_ALG_HANDLE
by default #101325 (Windows RNG: UseBCRYPT_RNG_ALG_HANDLE
by default)std::collections::HashSet::drain
documentation #101330 (Fixstd::collections::HashSet::drain
documentation)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup