-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
errors: share SilentEmitter
between rustc and rustfmt
#121301
Conversation
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt |
) -> Result<Cow<'_, str>, TranslateError<'_>> { | ||
silent_translate(message) | ||
// Ideally this field wouldn't be necessary and the fallback bundle in `fatal_dcx` would be | ||
// used but the lock prevents this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would appreciate any suggestions for how to work around this..
This comment has been minimized.
This comment has been minimized.
273c4a5
to
c5d8679
Compare
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
c5d8679
to
4edb5fa
Compare
This comment has been minimized.
This comment has been minimized.
4edb5fa
to
d420015
Compare
This comment was marked as resolved.
This comment was marked as resolved.
7369d68
to
4da2abf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rustfmt changes look good to me 👍🏼
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: David Wood <david@davidtw.co>
4da2abf
to
2ee0409
Compare
@bors r+ |
…r=pnkfelix errors: share `SilentEmitter` between rustc and rustfmt Fixes rust-lang/rustfmt#6082. Shares the `SilentEmitter` between rustc and rustfmt, and gives it a fallback bundle (since it can emit diagnostics in some contexts).
…r=pnkfelix errors: share `SilentEmitter` between rustc and rustfmt Fixes rust-lang/rustfmt#6082. Shares the `SilentEmitter` between rustc and rustfmt, and gives it a fallback bundle (since it can emit diagnostics in some contexts).
…r=pnkfelix errors: share `SilentEmitter` between rustc and rustfmt Fixes rust-lang/rustfmt#6082. Shares the `SilentEmitter` between rustc and rustfmt, and gives it a fallback bundle (since it can emit diagnostics in some contexts).
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#121065 (Add basic i18n guidance for `Display`) - rust-lang#121301 (errors: share `SilentEmitter` between rustc and rustfmt) - rust-lang#121744 (Stop using Bubble in coherence and instead emulate it with an intercrate check) - rust-lang#121829 (Dummy tweaks (attempt 2)) - rust-lang#121857 (Implement async closure signature deduction) - rust-lang#121894 (const_eval_select: make it safe but be careful with what we expose on stable for now) - rust-lang#121905 (Add a `description` field to target definitions) - rust-lang#122022 (loongarch: add frecipe and relax target feature) - rust-lang#122028 (Remove some dead code) r? `@ghost` `@rustbot` modify labels: rollup
…r=pnkfelix errors: share `SilentEmitter` between rustc and rustfmt Fixes rust-lang/rustfmt#6082. Shares the `SilentEmitter` between rustc and rustfmt, and gives it a fallback bundle (since it can emit diagnostics in some contexts).
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#121202 (Limit the number of names and values in check-cfg diagnostics) - rust-lang#121301 (errors: share `SilentEmitter` between rustc and rustfmt) - rust-lang#121658 (Hint user to update nightly on ICEs produced from outdated nightly) - rust-lang#121846 (only compare ambiguity item that have hard error) - rust-lang#121961 (add test for rust-lang#78894 rust-lang#71450) - rust-lang#121975 (hir_analysis: enums return `None` in `find_field`) - rust-lang#121978 (Fix duplicated path in the "not found dylib" error) - rust-lang#121991 (Merge impl_trait_in_assoc_types_defined_by query back into `opaque_types_defined_by`) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#121202 (Limit the number of names and values in check-cfg diagnostics) - rust-lang#121301 (errors: share `SilentEmitter` between rustc and rustfmt) - rust-lang#121658 (Hint user to update nightly on ICEs produced from outdated nightly) - rust-lang#121846 (only compare ambiguity item that have hard error) - rust-lang#121961 (add test for rust-lang#78894 rust-lang#71450) - rust-lang#121975 (hir_analysis: enums return `None` in `find_field`) - rust-lang#121978 (Fix duplicated path in the "not found dylib" error) - rust-lang#121991 (Merge impl_trait_in_assoc_types_defined_by query back into `opaque_types_defined_by`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#121301 - davidtwco:rustfmt-silent-emitter, r=pnkfelix errors: share `SilentEmitter` between rustc and rustfmt Fixes rust-lang/rustfmt#6082. Shares the `SilentEmitter` between rustc and rustfmt, and gives it a fallback bundle (since it can emit diagnostics in some contexts).
@davidtwco thanks again for working on this fix. I've got confirmation that rust-lang/rustfmt#6082 is resolved! |
…diagnostic, r=davidtwco conditionally ignore fatal diagnostic in the SilentEmitter This change is primarily meant to allow rustfmt to ignore all diagnostics when using the `SilentEmitter`. Back in rust-lang#121301 the `SilentEmitter` was shared between rustc and rustfmt. This changed rustfmt's behavior from ignoring all diagnostic to emitting fatal diagnostics, which lead to rust-lang/rustfmt#6109. These changes allow rustfmt to maintain its previous behaviour when using the `SilentEmitter`, while allowing rustc code to still emit fatal diagnostics.
…diagnostic, r=davidtwco conditionally ignore fatal diagnostic in the SilentEmitter This change is primarily meant to allow rustfmt to ignore all diagnostics when using the `SilentEmitter`. Back in rust-lang#121301 the `SilentEmitter` was shared between rustc and rustfmt. This changed rustfmt's behavior from ignoring all diagnostic to emitting fatal diagnostics, which lead to rust-lang/rustfmt#6109. These changes allow rustfmt to maintain its previous behaviour when using the `SilentEmitter`, while allowing rustc code to still emit fatal diagnostics.
Rollup merge of rust-lang#122737 - ytmimi:conditionally_ignore_fatal_diagnostic, r=davidtwco conditionally ignore fatal diagnostic in the SilentEmitter This change is primarily meant to allow rustfmt to ignore all diagnostics when using the `SilentEmitter`. Back in rust-lang#121301 the `SilentEmitter` was shared between rustc and rustfmt. This changed rustfmt's behavior from ignoring all diagnostic to emitting fatal diagnostics, which lead to rust-lang/rustfmt#6109. These changes allow rustfmt to maintain its previous behaviour when using the `SilentEmitter`, while allowing rustc code to still emit fatal diagnostics.
…diagnostic, r=davidtwco conditionally ignore fatal diagnostic in the SilentEmitter This change is primarily meant to allow rustfmt to ignore all diagnostics when using the `SilentEmitter`. Back in rust-lang#121301 the `SilentEmitter` was shared between rustc and rustfmt. This changed rustfmt's behavior from ignoring all diagnostic to emitting fatal diagnostics, which lead to rust-lang/rustfmt#6109. These changes allow rustfmt to maintain its previous behaviour when using the `SilentEmitter`, while allowing rustc code to still emit fatal diagnostics.
…diagnostic, r=davidtwco conditionally ignore fatal diagnostic in the SilentEmitter This change is primarily meant to allow rustfmt to ignore all diagnostics when using the `SilentEmitter`. Back in rust-lang#121301 the `SilentEmitter` was shared between rustc and rustfmt. This changed rustfmt's behavior from ignoring all diagnostic to emitting fatal diagnostics, which lead to rust-lang/rustfmt#6109. These changes allow rustfmt to maintain its previous behaviour when using the `SilentEmitter`, while allowing rustc code to still emit fatal diagnostics.
Fixes rust-lang/rustfmt#6082.
Shares the
SilentEmitter
between rustc and rustfmt, and gives it a fallback bundle (since it can emit diagnostics in some contexts).