X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_session%2Fsrc%2Fsession.rs;h=2a5ddd4e9e42016f606aec114d49d4c27776d240;hb=f236b6853ab7efadcc7d35a27951529f877f210c;hp=b5058fd699aca0c900847c7a414081ff973c8ab1;hpb=db872ee1b8a6f8a598eb6cdadd1fc9d4cab374f0;p=rust.git diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index b5058fd699a..2a5ddd4e9e4 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -280,7 +280,7 @@ pub fn init_crate_types(&self, crate_types: Vec) { self.crate_types.set(crate_types).expect("`crate_types` was initialized twice") } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn struct_span_warn>( &self, sp: S, @@ -288,7 +288,7 @@ pub fn struct_span_warn>( ) -> DiagnosticBuilder<'_, ()> { self.diagnostic().struct_span_warn(sp, msg) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn struct_span_warn_with_expectation>( &self, sp: S, @@ -297,7 +297,7 @@ pub fn struct_span_warn_with_expectation>( ) -> DiagnosticBuilder<'_, ()> { self.diagnostic().struct_span_warn_with_expectation(sp, msg, id) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn struct_span_warn_with_code>( &self, sp: S, @@ -306,11 +306,11 @@ pub fn struct_span_warn_with_code>( ) -> DiagnosticBuilder<'_, ()> { self.diagnostic().struct_span_warn_with_code(sp, msg, code) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn struct_warn(&self, msg: impl Into) -> DiagnosticBuilder<'_, ()> { self.diagnostic().struct_warn(msg) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn struct_warn_with_expectation( &self, msg: impl Into, @@ -318,7 +318,7 @@ pub fn struct_warn_with_expectation( ) -> DiagnosticBuilder<'_, ()> { self.diagnostic().struct_warn_with_expectation(msg, id) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn struct_span_allow>( &self, sp: S, @@ -326,11 +326,11 @@ pub fn struct_span_allow>( ) -> DiagnosticBuilder<'_, ()> { self.diagnostic().struct_span_allow(sp, msg) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn struct_allow(&self, msg: impl Into) -> DiagnosticBuilder<'_, ()> { self.diagnostic().struct_allow(msg) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn struct_expect( &self, msg: impl Into, @@ -338,7 +338,7 @@ pub fn struct_expect( ) -> DiagnosticBuilder<'_, ()> { self.diagnostic().struct_expect(msg, id) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn struct_span_err>( &self, sp: S, @@ -346,7 +346,7 @@ pub fn struct_span_err>( ) -> DiagnosticBuilder<'_, ErrorGuaranteed> { self.diagnostic().struct_span_err(sp, msg) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn struct_span_err_with_code>( &self, sp: S, @@ -356,14 +356,14 @@ pub fn struct_span_err_with_code>( self.diagnostic().struct_span_err_with_code(sp, msg, code) } // FIXME: This method should be removed (every error should have an associated error code). - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn struct_err( &self, msg: impl Into, ) -> DiagnosticBuilder<'_, ErrorGuaranteed> { self.parse_sess.struct_err(msg) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn struct_err_with_code( &self, msg: impl Into, @@ -371,7 +371,7 @@ pub fn struct_err_with_code( ) -> DiagnosticBuilder<'_, ErrorGuaranteed> { self.diagnostic().struct_err_with_code(msg, code) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn struct_warn_with_code( &self, msg: impl Into, @@ -379,7 +379,7 @@ pub fn struct_warn_with_code( ) -> DiagnosticBuilder<'_, ()> { self.diagnostic().struct_warn_with_code(msg, code) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn struct_span_fatal>( &self, sp: S, @@ -387,7 +387,7 @@ pub fn struct_span_fatal>( ) -> DiagnosticBuilder<'_, !> { self.diagnostic().struct_span_fatal(sp, msg) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn struct_span_fatal_with_code>( &self, sp: S, @@ -396,16 +396,16 @@ pub fn struct_span_fatal_with_code>( ) -> DiagnosticBuilder<'_, !> { self.diagnostic().struct_span_fatal_with_code(sp, msg, code) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn struct_fatal(&self, msg: impl Into) -> DiagnosticBuilder<'_, !> { self.diagnostic().struct_fatal(msg) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn span_fatal>(&self, sp: S, msg: impl Into) -> ! { self.diagnostic().span_fatal(sp, msg) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn span_fatal_with_code>( &self, sp: S, @@ -414,11 +414,11 @@ pub fn span_fatal_with_code>( ) -> ! { self.diagnostic().span_fatal_with_code(sp, msg, code) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn fatal(&self, msg: impl Into) -> ! { self.diagnostic().fatal(msg).raise() } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn span_err_or_warn>( &self, is_warning: bool, @@ -431,7 +431,7 @@ pub fn span_err_or_warn>( self.span_err(sp, msg); } } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn span_err>( &self, sp: S, @@ -439,7 +439,7 @@ pub fn span_err>( ) -> ErrorGuaranteed { self.diagnostic().span_err(sp, msg) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn span_err_with_code>( &self, sp: S, @@ -448,7 +448,7 @@ pub fn span_err_with_code>( ) { self.diagnostic().span_err_with_code(sp, msg, code) } - #[cfg_attr(not(bootstrap), rustc_lint_diagnostics)] + #[rustc_lint_diagnostics] pub fn err(&self, msg: impl Into) -> ErrorGuaranteed { self.diagnostic().err(msg) }