mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Rollup merge of #102356 - davidtwco:translation-bootstrap-bump-allow-lint, r=lcnr
session: remove now-unnecessary lint `#[allow]`s In #101230, the internal diagnostic migration lints - `diagnostic_outside_of_impl` and `untranslatable_diagnostic` - were modified so that they wouldn't trigger on functions annotated with `#[rustc_lint_diagnostics]`. However, this change has to make it into the bootstrap compiler before the `#[allow]` annotations that it aims to remove can be removed, which is possible now that #102051 has landed.
This commit is contained in:
commit
3ca0cd0f94
@ -376,8 +376,6 @@ impl ParseSess {
|
||||
}
|
||||
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
pub fn struct_err(
|
||||
&self,
|
||||
msg: impl Into<DiagnosticMessage>,
|
||||
@ -386,22 +384,16 @@ impl ParseSess {
|
||||
}
|
||||
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
pub fn struct_warn(&self, msg: impl Into<DiagnosticMessage>) -> DiagnosticBuilder<'_, ()> {
|
||||
self.span_diagnostic.struct_warn(msg)
|
||||
}
|
||||
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
pub fn struct_fatal(&self, msg: impl Into<DiagnosticMessage>) -> DiagnosticBuilder<'_, !> {
|
||||
self.span_diagnostic.struct_fatal(msg)
|
||||
}
|
||||
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
pub fn struct_diagnostic<G: EmissionGuarantee>(
|
||||
&self,
|
||||
msg: impl Into<DiagnosticMessage>,
|
||||
|
@ -288,8 +288,6 @@ impl Session {
|
||||
}
|
||||
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn struct_span_warn<S: Into<MultiSpan>>(
|
||||
&self,
|
||||
sp: S,
|
||||
@ -298,8 +296,6 @@ impl Session {
|
||||
self.diagnostic().struct_span_warn(sp, msg)
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn struct_span_warn_with_expectation<S: Into<MultiSpan>>(
|
||||
&self,
|
||||
sp: S,
|
||||
@ -309,8 +305,6 @@ impl Session {
|
||||
self.diagnostic().struct_span_warn_with_expectation(sp, msg, id)
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn struct_span_warn_with_code<S: Into<MultiSpan>>(
|
||||
&self,
|
||||
sp: S,
|
||||
@ -320,14 +314,10 @@ impl Session {
|
||||
self.diagnostic().struct_span_warn_with_code(sp, msg, code)
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn struct_warn(&self, msg: impl Into<DiagnosticMessage>) -> DiagnosticBuilder<'_, ()> {
|
||||
self.diagnostic().struct_warn(msg)
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn struct_warn_with_expectation(
|
||||
&self,
|
||||
msg: impl Into<DiagnosticMessage>,
|
||||
@ -336,8 +326,6 @@ impl Session {
|
||||
self.diagnostic().struct_warn_with_expectation(msg, id)
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn struct_span_allow<S: Into<MultiSpan>>(
|
||||
&self,
|
||||
sp: S,
|
||||
@ -346,14 +334,10 @@ impl Session {
|
||||
self.diagnostic().struct_span_allow(sp, msg)
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn struct_allow(&self, msg: impl Into<DiagnosticMessage>) -> DiagnosticBuilder<'_, ()> {
|
||||
self.diagnostic().struct_allow(msg)
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn struct_expect(
|
||||
&self,
|
||||
msg: impl Into<DiagnosticMessage>,
|
||||
@ -362,8 +346,6 @@ impl Session {
|
||||
self.diagnostic().struct_expect(msg, id)
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn struct_span_err<S: Into<MultiSpan>>(
|
||||
&self,
|
||||
sp: S,
|
||||
@ -372,8 +354,6 @@ impl Session {
|
||||
self.diagnostic().struct_span_err(sp, msg)
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn struct_span_err_with_code<S: Into<MultiSpan>>(
|
||||
&self,
|
||||
sp: S,
|
||||
@ -384,8 +364,6 @@ impl Session {
|
||||
}
|
||||
// FIXME: This method should be removed (every error should have an associated error code).
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn struct_err(
|
||||
&self,
|
||||
msg: impl Into<DiagnosticMessage>,
|
||||
@ -393,8 +371,6 @@ impl Session {
|
||||
self.parse_sess.struct_err(msg)
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn struct_err_with_code(
|
||||
&self,
|
||||
msg: impl Into<DiagnosticMessage>,
|
||||
@ -403,8 +379,6 @@ impl Session {
|
||||
self.diagnostic().struct_err_with_code(msg, code)
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn struct_warn_with_code(
|
||||
&self,
|
||||
msg: impl Into<DiagnosticMessage>,
|
||||
@ -413,8 +387,6 @@ impl Session {
|
||||
self.diagnostic().struct_warn_with_code(msg, code)
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn struct_span_fatal<S: Into<MultiSpan>>(
|
||||
&self,
|
||||
sp: S,
|
||||
@ -423,8 +395,6 @@ impl Session {
|
||||
self.diagnostic().struct_span_fatal(sp, msg)
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn struct_span_fatal_with_code<S: Into<MultiSpan>>(
|
||||
&self,
|
||||
sp: S,
|
||||
@ -434,21 +404,15 @@ impl Session {
|
||||
self.diagnostic().struct_span_fatal_with_code(sp, msg, code)
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn struct_fatal(&self, msg: impl Into<DiagnosticMessage>) -> DiagnosticBuilder<'_, !> {
|
||||
self.diagnostic().struct_fatal(msg)
|
||||
}
|
||||
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn span_fatal<S: Into<MultiSpan>>(&self, sp: S, msg: impl Into<DiagnosticMessage>) -> ! {
|
||||
self.diagnostic().span_fatal(sp, msg)
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn span_fatal_with_code<S: Into<MultiSpan>>(
|
||||
&self,
|
||||
sp: S,
|
||||
@ -458,14 +422,10 @@ impl Session {
|
||||
self.diagnostic().span_fatal_with_code(sp, msg, code)
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn fatal(&self, msg: impl Into<DiagnosticMessage>) -> ! {
|
||||
self.diagnostic().fatal(msg).raise()
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn span_err_or_warn<S: Into<MultiSpan>>(
|
||||
&self,
|
||||
is_warning: bool,
|
||||
@ -479,8 +439,6 @@ impl Session {
|
||||
}
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn span_err<S: Into<MultiSpan>>(
|
||||
&self,
|
||||
sp: S,
|
||||
@ -489,8 +447,6 @@ impl Session {
|
||||
self.diagnostic().span_err(sp, msg)
|
||||
}
|
||||
#[rustc_lint_diagnostics]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
pub fn span_err_with_code<S: Into<MultiSpan>>(
|
||||
&self,
|
||||
sp: S,
|
||||
|
Loading…
Reference in New Issue
Block a user