diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-07-02 19:29:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-02 19:29:39 +0200 |
| commit | bc8bcc7e8a9d4caf6405c3a2edc1a607df8340e9 (patch) | |
| tree | 50bdd2b67d6061ed827c8531f89c4eed860b0552 /compiler | |
| parent | 0617a9eb95388fa7b925fadd42357b8ae2a59d35 (diff) | |
| parent | b4d35fde7e2b7a08eafc537344ed861132e8bf50 (diff) | |
| download | rust-bc8bcc7e8a9d4caf6405c3a2edc1a607df8340e9.tar.gz rust-bc8bcc7e8a9d4caf6405c3a2edc1a607df8340e9.zip | |
Rollup merge of #143306 - samueltardieu:track-clippy-lints-emission, r=petrochenkov
Add `track_caller` attributes to trace origin of Clippy lints This allows the use of `-Z track-diagnostics` to see the origin of Clippy lints emission, as is already the case for lints coming from rustc.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_lint/src/context.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs index 95663204ec3..b694d3dd49b 100644 --- a/compiler/rustc_lint/src/context.rs +++ b/compiler/rustc_lint/src/context.rs @@ -504,6 +504,7 @@ pub trait LintContext { /// /// [`lint_level`]: rustc_middle::lint::lint_level#decorate-signature #[rustc_lint_diagnostics] + #[track_caller] fn opt_span_lint<S: Into<MultiSpan>>( &self, lint: &'static Lint, @@ -542,6 +543,7 @@ pub trait LintContext { /// /// [`lint_level`]: rustc_middle::lint::lint_level#decorate-signature #[rustc_lint_diagnostics] + #[track_caller] fn span_lint<S: Into<MultiSpan>>( &self, lint: &'static Lint, |
