0c653d9f91
* instead simply set the primary message inside the lint decorator functions * it used to be this way before [#]101986 which introduced `msg` to prevent good path delayed bugs (which no longer exist) from firing under certain circumstances when lints were suppressed / silenced * this is no longer necessary for various reasons I presume * it shaves off complexity and makes further changes easier to implement
21 lines
1.1 KiB
Plaintext
21 lines
1.1 KiB
Plaintext
error: use of a disallowed method `rustc_lint::context::LintContext::span_lint`
|
|
--> tests/ui-internal/disallow_span_lint.rs:14:5
|
|
|
|
|
LL | cx.span_lint(lint, span, |lint| { lint.primary_message(msg); });
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: this function does not add a link to our documentation, please use the `clippy_utils::diagnostics::span_lint*` functions instead (from clippy.toml)
|
|
= note: `-D clippy::disallowed-methods` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::disallowed_methods)]`
|
|
|
|
error: use of a disallowed method `rustc_middle::ty::context::TyCtxt::node_span_lint`
|
|
--> tests/ui-internal/disallow_span_lint.rs:18:5
|
|
|
|
|
LL | tcx.node_span_lint(lint, hir_id, span, |lint| { lint.primary_message(msg); });
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= 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)
|
|
|
|
error: aborting due to 2 previous errors
|
|
|