diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs index a16bb7f1a5f..de9e71d26e1 100644 --- a/compiler/rustc_lint/src/context.rs +++ b/compiler/rustc_lint/src/context.rs @@ -13,6 +13,8 @@ //! previous lint state is pushed onto a stack and the ast is then recursed //! upon. As the ast is traversed, this keeps track of the current lint level //! for all lint attributes. +#![deny(rustc::untranslatable_diagnostic)] +#![deny(rustc::diagnostic_outside_of_impl)] use self::TargetLint::*; @@ -965,6 +967,7 @@ fn lint( /// Note that this function should only be called for [`LintExpectationId`]s /// retrieved from the current lint pass. Buffered or manually created ids can /// cause ICEs. + #[rustc_lint_diagnostics] fn fulfill_expectation(&self, expectation: LintExpectationId) { // We need to make sure that submitted expectation ids are correctly fulfilled suppressed // and stored between compilation sessions. To not manually do these steps, we simply create @@ -1011,6 +1014,7 @@ fn lints(&self) -> &LintStore { &*self.lint_store } + #[rustc_lint_diagnostics] fn lookup>( &self, lint: &'static Lint, @@ -1045,6 +1049,7 @@ fn lints(&self) -> &LintStore { self.builder.lint_store() } + #[rustc_lint_diagnostics] fn lookup>( &self, lint: &'static Lint,