From 57d6f840b9f6d586b7d2ee2549fbfec4e1088dc1 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 30 Nov 2023 14:01:35 +1100 Subject: Rename `*note_without_error` as `*note`. Because the variant name in `Level` is `Note`, and the `without_error` suffix is omitted in similar cases like `struct_allow` and `struct_help`. --- compiler/rustc_errors/src/lib.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'compiler/rustc_errors/src') diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index dc3b189c4c2..ebac9a19d62 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -927,10 +927,7 @@ impl Handler { /// Construct a builder at the `Note` level with the `msg`. #[rustc_lint_diagnostics] #[track_caller] - pub fn struct_note_without_error( - &self, - msg: impl Into, - ) -> DiagnosticBuilder<'_, ()> { + pub fn struct_note(&self, msg: impl Into) -> DiagnosticBuilder<'_, ()> { DiagnosticBuilder::new(self, Level::Note, msg) } @@ -1022,11 +1019,7 @@ impl Handler { #[track_caller] #[rustc_lint_diagnostics] - pub fn span_note_without_error( - &self, - span: impl Into, - msg: impl Into, - ) { + pub fn span_note(&self, span: impl Into, msg: impl Into) { self.emit_diag_at_span(Diagnostic::new(Note, msg), span); } @@ -1059,7 +1052,7 @@ impl Handler { } #[rustc_lint_diagnostics] - pub fn note_without_error(&self, msg: impl Into) { + pub fn note(&self, msg: impl Into) { DiagnosticBuilder::new(self, Note, msg).emit(); } -- cgit 1.4.1-3-g733a5