add: #[rustc_lint_diagnostics] for more context.rs functions.

This commit is contained in:
Rejyr 2022-11-10 21:01:45 -05:00
parent 78fce795d8
commit ce72f942d7

View File

@ -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<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
@ -1045,6 +1049,7 @@ fn lints(&self) -> &LintStore {
self.builder.lint_store()
}
#[rustc_lint_diagnostics]
fn lookup<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,