diff options
Diffstat (limited to 'compiler/rustc_middle/src/lint.rs')
| -rw-r--r-- | compiler/rustc_middle/src/lint.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/lint.rs b/compiler/rustc_middle/src/lint.rs index e55b0454eef..c7c5f56867a 100644 --- a/compiler/rustc_middle/src/lint.rs +++ b/compiler/rustc_middle/src/lint.rs @@ -210,6 +210,10 @@ pub struct LintExpectation { /// adjusted to include an additional note. Therefore, we have to track if /// the expectation is for the lint. pub is_unfulfilled_lint_expectations: bool, + /// This will hold the name of the tool that this lint belongs to. For + /// the lint `clippy::some_lint` the tool would be `clippy`, the same + /// goes for `rustdoc`. This will be `None` for rustc lints + pub lint_tool: Option<Symbol>, } impl LintExpectation { @@ -217,8 +221,9 @@ impl LintExpectation { reason: Option<Symbol>, emission_span: Span, is_unfulfilled_lint_expectations: bool, + lint_tool: Option<Symbol>, ) -> Self { - Self { reason, emission_span, is_unfulfilled_lint_expectations } + Self { reason, emission_span, is_unfulfilled_lint_expectations, lint_tool } } } |
