errors: share SilentEmitter between rustc and rustfmt#121301
Merged
bors merged 1 commit intorust-lang:masterfrom Mar 6, 2024
Merged
errors: share SilentEmitter between rustc and rustfmt#121301bors merged 1 commit intorust-lang:masterfrom
SilentEmitter between rustc and rustfmt#121301bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
Collaborator
|
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt |
davidtwco
commented
Feb 19, 2024
| ) -> 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. |
Member
Author
There was a problem hiding this comment.
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
ytmimi
reviewed
Feb 21, 2024
ytmimi
reviewed
Feb 21, 2024
This comment was marked as resolved.
This comment was marked as resolved.
7369d68 to
4da2abf
Compare
ytmimi
approved these changes
Mar 4, 2024
Contributor
ytmimi
left a comment
There was a problem hiding this comment.
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
Contributor
|
@bors r+ |
Collaborator
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 5, 2024
…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).
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 5, 2024
…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).
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 5, 2024
…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).
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 5, 2024
…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
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 5, 2024
…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).
This was referenced Mar 5, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 5, 2024
…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
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 6, 2024
…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
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 6, 2024
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).
Contributor
|
@davidtwco thanks again for working on this fix. I've got confirmation that rust-lang/rustfmt#6082 is resolved! |
This was referenced Mar 19, 2024
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 24, 2024
…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.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 24, 2024
…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.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 24, 2024
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.
RenjiSann
pushed a commit
to RenjiSann/rust
that referenced
this pull request
Mar 25, 2024
…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.
calebcartwright
pushed a commit
to calebcartwright/rust
that referenced
this pull request
Jun 22, 2024
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes rust-lang/rustfmt#6082.
Shares the
SilentEmitterbetween rustc and rustfmt, and gives it a fallback bundle (since it can emit diagnostics in some contexts).