-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 12 pull requests #120715
Rollup of 12 pull requests #120715
Conversation
And make sure all other imports have non-empty resolution lists.
It doesn't affect behaviour, but makes sense with (a) `FailureNote` having `()` as its emission guarantee, and (b) in `Level` the `is_error` levels now are all listed before the non-`is_error` levels.
I.e. `Bug` and `Fatal` level diagnostics are never downgraded.
- Combine two different blocks involving `diagnostic.level.get_expectation_id()` into one. - Combine several `if`s involving `diagnostic.level` into a single `match`. This requires reordering some of the operations, but this has no functional effect.
The two kinds of delayed bug have quite different semantics so a stronger conceptual separation is nice. (`is_error` is a good example, because the two kinds have different behaviour.) The commit also moves the `DelayedBug` variant after `Error` in `Level`, to reflect the fact that it's weaker than `Error` -- it might trigger an error but also might not. (The pre-existing `downgrade_to_delayed_bug` function also reflects the notion that delayed bugs are lower/after normal errors.) Plus it condenses some of the comments on `Level` into a table, for easier reading, and introduces `can_be_top_or_sub` to indicate which levels can be used in top-level diagnostics vs. subdiagnostics. Finally, it renames `DiagCtxtInner::span_delayed_bugs` as `DiagCtxtInner::delayed_bugs`. The `span_` prefix is unnecessary because some delayed bugs don't have a span.
All the other `emit`/`emit_diagnostic` methods were recently made consuming (e.g. rust-lang#119606), but this one wasn't. But it makes sense to. Much of this is straightforward, and lots of `clone` calls are avoided. There are a couple of tricky bits. - `Emitter::primary_span_formatted` no longer takes a `Diagnostic` and returns a pair. Instead it takes the two fields from `Diagnostic` that it used (`span` and `suggestions`) as `&mut`, and modifies them. This is necessary to avoid the cloning of `diag.children` in two emitters. - `from_errors_diagnostic` is rearranged so various uses of `diag` occur before the consuming `emit_diagnostic` call.
…i-obk Some cleanups around diagnostic levels. Plus some refactoring in and around diagnostic levels and emission. Details in the individual commit logs. r? ````@oli-obk````
…handling, r=estebank Simplify codegen diagnostic handling Some nice improvements. Details in the individual commit logs. r? ````@estebank````
…in-pat, r=estebank Suggest `[tail @ ..]` on `[..tail]` and `[...tail]` where `tail` is unresolved Fixes rust-lang#120591. ~~Will conflict with rust-lang#120570~~ (rebased). r? estebank or compiler
rustc_monomorphize: fix outdated comment in partition `max_cgu_count` was removed in rust-lang@5182151, but not comment (usage in `merge_codegen_units` was removed earlier). r? `@nnethercote`
…r-errors hir: Stop keeping prefixes for most of `use` list stems And make sure all other imports have non-empty resolution lists. Addresses one of FIXMEs in rust-lang#120206.
…piler-errors Emit a diagnostic for invalid target options This turns the ICE in rust-lang#120625 into a translatable diagnostic.
For E0223, suggest associated functions that are similar to the path e.g. for `String::from::utf8`, suggest `String::from_utf8` Closes rust-lang#109195
cleanup effect var handling r? types
rustc_metadata: fix typo
…=oli-obk miri: fix ICE with symbolic alignment check on extern static Fixes rust-lang/miri#3288. Also fixes [this example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=38ee338ff10726be72bdd6efa3386763). This could almost be a Miri PR, except for that typo fix in the validator. I started this as a rustc patch since I thought I need rustc changes, and now it'd be too annoying to turn this into a Miri PR... r? `@oli-obk`
…ompiler-errors Remove b-naber from the compiler review rotation They have been inactive for over two months and occasionally S-waiting-on-review PRs didn't get reviewed for a while. I've stolen a few of them. I've discussed this with `@b-naber` in private and they agreed to leave the review rotation for now. Thank you very much for all the helpful PR reviews you did in the past! <3 r? compiler
…sts, r=fmease Make async closures test use async bound modifier Cosmetic change, separates the `AsyncFn` definitions from the tests.
@bors r+ rollup=never p=12 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 4a2fe4491e In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (0d53135): 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.
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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 662.774s -> 663.272s (0.08%) |
Successful merges:
Emitter::emit_diagnostic
consuming. #120575 (Simplify codegen diagnostic handling)[tail @ ..]
on[..tail]
and[...tail]
wheretail
is unresolved #120597 (Suggest[tail @ ..]
on[..tail]
and[...tail]
wheretail
is unresolved)use
list stems #120609 (hir: Stop keeping prefixes for most ofuse
list stems)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup