diff options
| author | David Wood <david.wood@huawei.com> | 2022-07-11 16:29:24 +0100 |
|---|---|---|
| committer | David Wood <david.wood@huawei.com> | 2022-07-15 16:13:47 +0100 |
| commit | c3fdf748856fa220dc251647808db8535ac0bba2 (patch) | |
| tree | 90761b4da497d24d8ceb9360091a6e649987b3ff /compiler/rustc_errors/src | |
| parent | 06f480661f66e35869521ccd60278107233f9670 (diff) | |
| download | rust-c3fdf748856fa220dc251647808db8535ac0bba2.tar.gz rust-c3fdf748856fa220dc251647808db8535ac0bba2.zip | |
errors: lint on `LintDiagnosticBuilder::build`
Apply the `#[rustc_lint_diagnostics]` attribute to `LintDiagnosticBuilder::build` so that diagnostic migration lints will trigger for it. Signed-off-by: David Wood <david.wood@huawei.com>
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic_builder.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_errors/src/diagnostic_builder.rs b/compiler/rustc_errors/src/diagnostic_builder.rs index 99ac6a3546e..9e68ee282e6 100644 --- a/compiler/rustc_errors/src/diagnostic_builder.rs +++ b/compiler/rustc_errors/src/diagnostic_builder.rs @@ -595,6 +595,7 @@ macro_rules! error_code { pub struct LintDiagnosticBuilder<'a, G: EmissionGuarantee>(DiagnosticBuilder<'a, G>); impl<'a, G: EmissionGuarantee> LintDiagnosticBuilder<'a, G> { + #[rustc_lint_diagnostics] /// Return the inner `DiagnosticBuilder`, first setting the primary message to `msg`. pub fn build(mut self, msg: impl Into<DiagnosticMessage>) -> DiagnosticBuilder<'a, G> { self.0.set_primary_message(msg); |
