-
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 #118443
Rollup of 7 pull requests #118443
Conversation
…rget features outside an unsafe block
When encountering a bare assignment in a let-chain, suggest turning the assignment into a `let` expression or an equality check. ``` error: expected expression, found `let` statement --> $DIR/bad-if-let-suggestion.rs:5:8 | LL | if let x = 1 && i = 2 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions help: you might have meant to continue the let-chain | LL | if let x = 1 && let i = 2 {} | +++ help: you might have meant to compare for equality | LL | if let x = 1 && i == 2 {} | + ```
…unction with target features outside an unsafe block
They're only used for HTML, so it makes more sense for them to live their.
x.py does not support specify multiple --target keywords. The targets must be specified comma separated.
…r=compiler-errors Add `never_patterns` feature gate This PR adds the feature gate and most basic parsing for the experimental `never_patterns` feature. See the tracking issue (rust-lang#118155) for details on the experiment. `@scottmcm` has agreed to be my lang-team liaison for this experiment.
…r-errors Suggest `let` or `==` on typo'd let-chain When encountering a bare assignment in a let-chain, suggest turning the assignment into a `let` expression or an equality check. ``` error: expected expression, found `let` statement --> $DIR/bad-if-let-suggestion.rs:5:8 | LL | if let x = 1 && i = 2 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions help: you might have meant to continue the let-chain | LL | if let x = 1 && let i = 2 {} | +++ help: you might have meant to compare for equality | LL | if let x = 1 && i == 2 {} | + ```
…cuviper also add is_empty to const raw slices We have this on mutable raw slices but not const raw slices, which makes little sense. Cc rust-lang#71146
…tures, r=est31 Print list of missing target features when calling a function with target features outside an unsafe block Fixes rust-lang#108680 Supersedes rust-lang#109710. I used the same wording for the messages, but the implementation is different. r? `@est31`
…r-errors,cjgillot ConstProp: Correctly remove const if unknown value assigned to it. Closes rust-lang#118328 The problematic sequence of MIR is: ```rust _1 = const 0_usize; _1 = const _; // This is an associated constant we can't know before monomorphization. _0 = _1; ``` 1. When `ConstProp::visit_assign` happens on `_1 = const 0_usize;`, it records that `0x0usize` is the value for `_1`. 2. Next `visit_assign` happens on `_1 = const _;`. Because the rvalue `.has_param()`, it can't be const evaled. 3. Finaly, `visit_assign` happens on `_0 = _1;`. Here it would think the value of `_1` was `0x0usize` from step 1. The solution is to remove consts when checking the RValue fails, as they may have contained values that should now be invalidated, as that local was overwritten. This should probably be back-ported to beta. Stable is more iffy, as it's gone unidentified since 1.70, so I only think it's worthwhile if there's another reason for a 1.74.1 release anyway.
…aumeGomez rustdoc: Move `AssocItemRender` and `RenderMode` to `html::render`. They're only used for HTML, so it makes more sense for them to live their.
Update nto-qnx.md x.py does not support specifying multiple `--target` keywords. The targets must be specified comma separated. Error: `error: the argument '--target <TARGET>' cannot be used multiple times`
@bors r+ rollup=never p=7 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: ec1f21cb04 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (ce4727f): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 673.349s -> 672.005s (-0.20%) |
Successful merges:
never_patterns
feature gate #118157 (Addnever_patterns
feature gate)let
or==
on typo'd let-chain #118191 (Suggestlet
or==
on typo'd let-chain)AssocItemRender
andRenderMode
tohtml::render
. #118428 (rustdoc: MoveAssocItemRender
andRenderMode
tohtml::render
.)Failed merges:
Fn<(..., ...)>
trait refs with parentheses (almost) always #118268 (Pretty printFn<(..., ...)>
trait refs with parentheses (almost) always)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup