diff options
| author | Michael Goulet <michael@errs.io> | 2024-07-14 14:22:11 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-07-14 14:22:11 -0400 |
| commit | f08c43afc7b801f2ab0109764df9cc959ebc8b79 (patch) | |
| tree | e40a2c74a1aafd3773850e0a8e48657def30864e /compiler | |
| parent | dc207339137a766d7f45590a97cfa0f2a0314e2f (diff) | |
| download | rust-f08c43afc7b801f2ab0109764df9cc959ebc8b79.tar.gz rust-f08c43afc7b801f2ab0109764df9cc959ebc8b79.zip | |
Suppress some fallout from gen in synstructure
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_macros/src/diagnostics/diagnostic.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_macros/src/diagnostics/subdiagnostic.rs | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_macros/src/diagnostics/diagnostic.rs b/compiler/rustc_macros/src/diagnostics/diagnostic.rs index a3abbdcf18c..2743660ab89 100644 --- a/compiler/rustc_macros/src/diagnostics/diagnostic.rs +++ b/compiler/rustc_macros/src/diagnostics/diagnostic.rs @@ -71,6 +71,8 @@ impl<'a> DiagnosticDerive<'a> { }); // A lifetime of `'a` causes conflicts, but `_sess` is fine. + // FIXME(edition_2024): Fix the `keyword_idents_2024` lint to not trigger here? + #[allow(keyword_idents_2024)] let mut imp = structure.gen_impl(quote! { gen impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for @Self where G: rustc_errors::EmissionGuarantee @@ -148,6 +150,8 @@ impl<'a> LintDiagnosticDerive<'a> { } }); + // FIXME(edition_2024): Fix the `keyword_idents_2024` lint to not trigger here? + #[allow(keyword_idents_2024)] let mut imp = structure.gen_impl(quote! { gen impl<'__a> rustc_errors::LintDiagnostic<'__a, ()> for @Self { #[track_caller] diff --git a/compiler/rustc_macros/src/diagnostics/subdiagnostic.rs b/compiler/rustc_macros/src/diagnostics/subdiagnostic.rs index 69014f39925..7f090f5ebc1 100644 --- a/compiler/rustc_macros/src/diagnostics/subdiagnostic.rs +++ b/compiler/rustc_macros/src/diagnostics/subdiagnostic.rs @@ -86,6 +86,9 @@ impl SubdiagnosticDerive { let diag = &self.diag; let f = &self.f; + + // FIXME(edition_2024): Fix the `keyword_idents_2024` lint to not trigger here? + #[allow(keyword_idents_2024)] let ret = structure.gen_impl(quote! { gen impl rustc_errors::Subdiagnostic for @Self { fn add_to_diag_with<__G, __F>( @@ -100,6 +103,7 @@ impl SubdiagnosticDerive { } } }); + ret } } |
