diff options
| author | bors <bors@rust-lang.org> | 2025-04-17 11:21:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-04-17 11:21:54 +0000 |
| commit | 883f9f72e87ccb6838d528d8158ea6323baacc65 (patch) | |
| tree | 8252f01daf779855a606cff9433342feddac0004 /compiler/rustc_builtin_macros/src/errors.rs | |
| parent | 94015d3cd4b48d098abd0f3e44af97dab2b713b4 (diff) | |
| parent | 7650fe95b1b2f4b030c0de9a06b5bea582f26480 (diff) | |
| download | rust-883f9f72e87ccb6838d528d8158ea6323baacc65.tar.gz rust-883f9f72e87ccb6838d528d8158ea6323baacc65.zip | |
Auto merge of #139949 - matthiaskrgr:rollup-pxc5tsx, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #138632 (Stabilize `cfg_boolean_literals`) - #139416 (unstable book; document `macro_metavar_expr_concat`) - #139782 (Consistent with treating Ctor Call as Struct in liveness analysis) - #139885 (document RUSTC_BOOTSTRAP, RUSTC_OVERRIDE_VERSION_STRING, and -Z allow-features in the unstable book) - #139904 (Explicitly annotate edition for `unpretty=expanded` and `unpretty=hir` tests) - #139932 (transmutability: Refactor tests for simplicity) - #139944 (Move eager translation to a method on Diag) - #139948 (git: ignore `60600a6fa403216bfd66e04f948b1822f6450af7` for blame purposes) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_builtin_macros/src/errors.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/errors.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/compiler/rustc_builtin_macros/src/errors.rs b/compiler/rustc_builtin_macros/src/errors.rs index c2b1dff4cf1..d14ad8f4014 100644 --- a/compiler/rustc_builtin_macros/src/errors.rs +++ b/compiler/rustc_builtin_macros/src/errors.rs @@ -1,7 +1,7 @@ use rustc_errors::codes::*; use rustc_errors::{ Diag, DiagCtxtHandle, Diagnostic, EmissionGuarantee, Level, MultiSpan, SingleLabelManySpans, - SubdiagMessageOp, Subdiagnostic, + Subdiagnostic, }; use rustc_macros::{Diagnostic, Subdiagnostic}; use rustc_span::{Ident, Span, Symbol}; @@ -684,13 +684,9 @@ pub(crate) struct FormatUnusedArg { // Allow the singular form to be a subdiagnostic of the multiple-unused // form of diagnostic. impl Subdiagnostic for FormatUnusedArg { - fn add_to_diag_with<G: EmissionGuarantee, F: SubdiagMessageOp<G>>( - self, - diag: &mut Diag<'_, G>, - f: &F, - ) { + fn add_to_diag<G: EmissionGuarantee>(self, diag: &mut Diag<'_, G>) { diag.arg("named", self.named); - let msg = f(diag, crate::fluent_generated::builtin_macros_format_unused_arg.into()); + let msg = diag.eagerly_translate(crate::fluent_generated::builtin_macros_format_unused_arg); diag.span_label(self.span, msg); } } |
