You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #13048 - Jarcho:disallowed_methods, r=blyxyas
Refactor `disallowed_methods` and narrow span
Using the span of the call site just produces noisy diagnostics for long calls. Especially multi-line calls.
changelog: none
Copy file name to clipboardExpand all lines: tests/ui-internal/disallow_span_lint.stderr
+6-10Lines changed: 6 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,18 @@
1
1
error: use of a disallowed method `rustc_lint::context::LintContext::span_lint`
2
-
--> tests/ui-internal/disallow_span_lint.rs:14:5
2
+
--> tests/ui-internal/disallow_span_lint.rs:14:8
3
3
|
4
-
LL | / cx.span_lint(lint, span, |lint| {
5
-
LL | | lint.primary_message(msg);
6
-
LL | | });
7
-
| |______^
4
+
LL | cx.span_lint(lint, span, |lint| {
5
+
| ^^^^^^^^^
8
6
|
9
7
= note: this function does not add a link to our documentation, please use the `clippy_utils::diagnostics::span_lint*` functions instead (from clippy.toml)
10
8
= note: `-D clippy::disallowed-methods` implied by `-D warnings`
11
9
= help: to override `-D warnings` add `#[allow(clippy::disallowed_methods)]`
12
10
13
11
error: use of a disallowed method `rustc_middle::ty::context::TyCtxt::node_span_lint`
= note: this function does not add a link to our documentation, please use the `clippy_utils::diagnostics::span_lint_hir*` functions instead (from clippy.toml)
0 commit comments