fix: lint against lint functions
fix: lint against the functions `LintContext::{lookup_with_diagnostics,lookup,struct_span_lint,lint}`, `TyCtxt::struct_lint_node`, `LintLevelsBuilder::struct_lint`.
This commit is contained in:
parent
73c9eaf214
commit
ae5cc9c56e
4 changed files with 7 additions and 0 deletions
|
@ -579,6 +579,7 @@ pub trait LintContext: Sized {
|
||||||
/// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation.
|
/// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation.
|
||||||
///
|
///
|
||||||
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
||||||
|
#[rustc_lint_diagnostics]
|
||||||
fn lookup_with_diagnostics(
|
fn lookup_with_diagnostics(
|
||||||
&self,
|
&self,
|
||||||
lint: &'static Lint,
|
lint: &'static Lint,
|
||||||
|
@ -882,6 +883,7 @@ pub trait LintContext: Sized {
|
||||||
/// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation.
|
/// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation.
|
||||||
///
|
///
|
||||||
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
||||||
|
#[rustc_lint_diagnostics]
|
||||||
fn lookup<S: Into<MultiSpan>>(
|
fn lookup<S: Into<MultiSpan>>(
|
||||||
&self,
|
&self,
|
||||||
lint: &'static Lint,
|
lint: &'static Lint,
|
||||||
|
@ -908,6 +910,7 @@ pub trait LintContext: Sized {
|
||||||
/// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation.
|
/// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation.
|
||||||
///
|
///
|
||||||
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
||||||
|
#[rustc_lint_diagnostics]
|
||||||
fn struct_span_lint<S: Into<MultiSpan>>(
|
fn struct_span_lint<S: Into<MultiSpan>>(
|
||||||
&self,
|
&self,
|
||||||
lint: &'static Lint,
|
lint: &'static Lint,
|
||||||
|
@ -933,6 +936,7 @@ pub trait LintContext: Sized {
|
||||||
/// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation.
|
/// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation.
|
||||||
///
|
///
|
||||||
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
||||||
|
#[rustc_lint_diagnostics]
|
||||||
fn lint(
|
fn lint(
|
||||||
&self,
|
&self,
|
||||||
lint: &'static Lint,
|
lint: &'static Lint,
|
||||||
|
|
|
@ -1073,6 +1073,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
|
||||||
/// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation.
|
/// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation.
|
||||||
///
|
///
|
||||||
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
||||||
|
#[rustc_lint_diagnostics]
|
||||||
pub(crate) fn struct_lint(
|
pub(crate) fn struct_lint(
|
||||||
&self,
|
&self,
|
||||||
lint: &'static Lint,
|
lint: &'static Lint,
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#![feature(let_chains)]
|
#![feature(let_chains)]
|
||||||
#![feature(min_specialization)]
|
#![feature(min_specialization)]
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
|
#![feature(rustc_attrs)]
|
||||||
#![recursion_limit = "256"]
|
#![recursion_limit = "256"]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
|
|
@ -2856,6 +2856,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||||
/// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation.
|
/// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation.
|
||||||
///
|
///
|
||||||
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
||||||
|
#[rustc_lint_diagnostics]
|
||||||
pub fn struct_lint_node(
|
pub fn struct_lint_node(
|
||||||
self,
|
self,
|
||||||
lint: &'static Lint,
|
lint: &'static Lint,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue