mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 23:03:06 +03:00
Call LateLintPass::check_attribute from with_lint_attrs
This commit is contained in:
@@ -22,6 +22,13 @@ struct T4;
|
||||
#[cfg_attr(panic = "unwind", expect(dead_code))]
|
||||
struct CfgT;
|
||||
|
||||
#[allow(clippy::allow_attributes, unused)]
|
||||
struct Allowed;
|
||||
|
||||
#[expect(clippy::allow_attributes)]
|
||||
#[allow(unused)]
|
||||
struct Expected;
|
||||
|
||||
fn ignore_external() {
|
||||
external! {
|
||||
#[allow(clippy::needless_borrow)] // Should not lint
|
||||
|
||||
@@ -22,6 +22,13 @@
|
||||
#[cfg_attr(panic = "unwind", allow(dead_code))]
|
||||
struct CfgT;
|
||||
|
||||
#[allow(clippy::allow_attributes, unused)]
|
||||
struct Allowed;
|
||||
|
||||
#[expect(clippy::allow_attributes)]
|
||||
#[allow(unused)]
|
||||
struct Expected;
|
||||
|
||||
fn ignore_external() {
|
||||
external! {
|
||||
#[allow(clippy::needless_borrow)] // Should not lint
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
error: `clippy::restriction` is not meant to be enabled as a group
|
||||
|
|
||||
= note: because of the command line `--warn clippy::restriction`
|
||||
= help: enable the restriction lints you need individually
|
||||
= note: `-D clippy::blanket-clippy-restriction-lints` implied by `-D warnings`
|
||||
= help: to override `-D warnings` add `#[allow(clippy::blanket_clippy_restriction_lints)]`
|
||||
|
||||
error: `clippy::restriction` is not meant to be enabled as a group
|
||||
--> $DIR/blanket_clippy_restriction_lints.rs:6:9
|
||||
|
|
||||
@@ -12,6 +5,8 @@ LL | #![warn(clippy::restriction)]
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: enable the restriction lints you need individually
|
||||
= note: `-D clippy::blanket-clippy-restriction-lints` implied by `-D warnings`
|
||||
= help: to override `-D warnings` add `#[allow(clippy::blanket_clippy_restriction_lints)]`
|
||||
|
||||
error: `clippy::restriction` is not meant to be enabled as a group
|
||||
--> $DIR/blanket_clippy_restriction_lints.rs:8:9
|
||||
@@ -29,5 +24,10 @@ LL | #![forbid(clippy::restriction)]
|
||||
|
|
||||
= help: enable the restriction lints you need individually
|
||||
|
||||
error: `clippy::restriction` is not meant to be enabled as a group
|
||||
|
|
||||
= note: because of the command line `--warn clippy::restriction`
|
||||
= help: enable the restriction lints you need individually
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
||||
Reference in New Issue
Block a user