File tree Expand file tree Collapse file tree 3 files changed +21
-7
lines changed Expand file tree Collapse file tree 3 files changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,13 @@ struct T4;
2222#[cfg_attr(panic = "unwind", expect(dead_code))]
2323struct CfgT;
2424
25+ #[allow(clippy::allow_attributes, unused)]
26+ struct Allowed;
27+
28+ #[expect(clippy::allow_attributes)]
29+ #[allow(unused)]
30+ struct Expected;
31+
2532fn ignore_external() {
2633 external! {
2734 #[allow(clippy::needless_borrow)] // Should not lint
Original file line number Diff line number Diff line change @@ -22,6 +22,13 @@ struct T4;
2222#[ cfg_attr( panic = "unwind" , allow( dead_code) ) ]
2323struct CfgT ;
2424
25+ #[ allow( clippy:: allow_attributes, unused) ]
26+ struct Allowed ;
27+
28+ #[ expect( clippy:: allow_attributes) ]
29+ #[ allow( unused) ]
30+ struct Expected ;
31+
2532fn ignore_external ( ) {
2633 external ! {
2734 #[ allow( clippy:: needless_borrow) ] // Should not lint
Original file line number Diff line number Diff line change 1- error: `clippy::restriction` is not meant to be enabled as a group
2- |
3- = note: because of the command line `--warn clippy::restriction`
4- = help: enable the restriction lints you need individually
5- = note: `-D clippy::blanket-clippy-restriction-lints` implied by `-D warnings`
6- = help: to override `-D warnings` add `#[allow(clippy::blanket_clippy_restriction_lints)]`
7-
81error: `clippy::restriction` is not meant to be enabled as a group
92 --> $DIR/blanket_clippy_restriction_lints.rs:6:9
103 |
114LL | #![warn(clippy::restriction)]
125 | ^^^^^^^^^^^^^^^^^^^
136 |
147 = help: enable the restriction lints you need individually
8+ = note: `-D clippy::blanket-clippy-restriction-lints` implied by `-D warnings`
9+ = help: to override `-D warnings` add `#[allow(clippy::blanket_clippy_restriction_lints)]`
1510
1611error: `clippy::restriction` is not meant to be enabled as a group
1712 --> $DIR/blanket_clippy_restriction_lints.rs:8:9
@@ -29,5 +24,10 @@ LL | #![forbid(clippy::restriction)]
2924 |
3025 = help: enable the restriction lints you need individually
3126
27+ error: `clippy::restriction` is not meant to be enabled as a group
28+ |
29+ = note: because of the command line `--warn clippy::restriction`
30+ = help: enable the restriction lints you need individually
31+
3232error: aborting due to 4 previous errors
3333
You can’t perform that action at this time.
0 commit comments