-
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
Make Emitter::emit_diagnostic
consuming.
#120575
Make Emitter::emit_diagnostic
consuming.
#120575
Conversation
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt |
cd93249
to
8e9eb16
Compare
@bors r+ |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
8e9eb16
to
226b3f3
Compare
I removed the unintentional @bors r=estebank |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
…handling, r=estebank Simplify codegen diagnostic handling Some nice improvements. Details in the individual commit logs. r? `@estebank`
☔ The latest upstream changes (presumably #120620) made this pull request unmergeable. Please resolve the merge conflicts. |
226b3f3
to
f4dce1e
Compare
I fixed the conflicts. @bors r=estebank |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#120507 (Account for non-overlapping unmet trait bounds in suggestion) - rust-lang#120518 (riscv only supports split_debuginfo=off for now) - rust-lang#120521 (Make `NonZero` constructors generic.) - rust-lang#120527 (Switch OwnedStore handle count to AtomicU32) - rust-lang#120550 (Continue to borrowck even if there were previous errors) - rust-lang#120587 (miri: normalize struct tail in ABI compat check) - rust-lang#120590 (Remove unused args from functions) - rust-lang#120607 (fix rust-lang#120603 by adding a check in default_read_buf) Failed merges: - rust-lang#120575 (Simplify codegen diagnostic handling) r? `@ghost` `@rustbot` modify labels: rollup
…handling, r=estebank Simplify codegen diagnostic handling Some nice improvements. Details in the individual commit logs. r? `@estebank`
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#120396 (Account for unbounded type param receiver in suggestions) - rust-lang#120423 (update indirect structural match lints to match RFC and to show up for dependencies) - rust-lang#120435 (Suggest name value cfg when only value is used for check-cfg) - rust-lang#120507 (Account for non-overlapping unmet trait bounds in suggestion) - rust-lang#120520 (Some cleanups around diagnostic levels.) - rust-lang#120521 (Make `NonZero` constructors generic.) - rust-lang#120527 (Switch OwnedStore handle count to AtomicU32) - rust-lang#120550 (Continue to borrowck even if there were previous errors) - rust-lang#120575 (Simplify codegen diagnostic handling) r? `@ghost` `@rustbot` modify labels: rollup
…handling, r=estebank Simplify codegen diagnostic handling Some nice improvements. Details in the individual commit logs. r? ``@estebank``
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#120396 (Account for unbounded type param receiver in suggestions) - rust-lang#120423 (update indirect structural match lints to match RFC and to show up for dependencies) - rust-lang#120435 (Suggest name value cfg when only value is used for check-cfg) - rust-lang#120507 (Account for non-overlapping unmet trait bounds in suggestion) - rust-lang#120521 (Make `NonZero` constructors generic.) - rust-lang#120527 (Switch OwnedStore handle count to AtomicU32) - rust-lang#120550 (Continue to borrowck even if there were previous errors) - rust-lang#120575 (Simplify codegen diagnostic handling) r? `@ghost` `@rustbot` modify labels: rollup
@bors r- |
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.
f4dce1e
to
d9508a1
Compare
Alas, it works in parallel compiler builds, but not in serial compiler builds. So the first two commits I had here aren't valid. I've updated to just have the third commit. @bors r=estebank rollup |
…handling, r=estebank Simplify codegen diagnostic handling Some nice improvements. Details in the individual commit logs. r? `@estebank`
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#120023 (tidy: reduce allocs) - rust-lang#120396 (Account for unbounded type param receiver in suggestions) - rust-lang#120435 (Suggest name value cfg when only value is used for check-cfg) - rust-lang#120507 (Account for non-overlapping unmet trait bounds in suggestion) - rust-lang#120520 (Some cleanups around diagnostic levels.) - rust-lang#120575 (Simplify codegen diagnostic handling) - rust-lang#120670 (cleanup effect var handling) Failed merges: - rust-lang#120423 (update indirect structural match lints to match RFC and to show up for dependencies) r? `@ghost` `@rustbot` modify labels: rollup
…handling, r=estebank Simplify codegen diagnostic handling Some nice improvements. Details in the individual commit logs. r? ``@estebank``
…handling, r=estebank Simplify codegen diagnostic handling Some nice improvements. Details in the individual commit logs. r? ```@estebank```
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#120302 (various const interning cleanups) - rust-lang#120520 (Some cleanups around diagnostic levels.) - rust-lang#120521 (Make `NonZero` constructors generic.) - rust-lang#120527 (Switch OwnedStore handle count to AtomicU32) - rust-lang#120564 (coverage: Split out counter increment sites from BCB node/edge counters) - rust-lang#120575 (Simplify codegen diagnostic handling) - rust-lang#120597 (Suggest `[tail @ ..]` on `[..tail]` and `[...tail]` where `tail` is unresolved) - rust-lang#120609 (hir: Stop keeping prefixes for most of `use` list stems) - rust-lang#120633 (pattern_analysis: gather up place-relevant info) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 12 pull requests Successful merges: - rust-lang#120520 (Some cleanups around diagnostic levels.) - rust-lang#120575 (Simplify codegen diagnostic handling) - rust-lang#120597 (Suggest `[tail @ ..]` on `[..tail]` and `[...tail]` where `tail` is unresolved) - rust-lang#120602 (rustc_monomorphize: fix outdated comment in partition) - rust-lang#120609 (hir: Stop keeping prefixes for most of `use` list stems) - rust-lang#120631 (Emit a diagnostic for invalid target options) - rust-lang#120632 (For E0223, suggest associated functions that are similar to the path) - rust-lang#120670 (cleanup effect var handling) - rust-lang#120673 (rustc_metadata: fix typo) - rust-lang#120683 (miri: fix ICE with symbolic alignment check on extern static) - rust-lang#120690 (Remove b-naber from the compiler review rotation) - rust-lang#120713 (Make async closures test use async bound modifier) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#120575 - nnethercote:simplify-codegen-diag-handling, r=estebank Simplify codegen diagnostic handling Some nice improvements. Details in the individual commit logs. r? ````@estebank````
Emitter::emit_diagnostic
consuming.
Some nice improvements. Details in the individual commit logs.
r? @estebank