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;
22
22
#[cfg_attr(panic = "unwind", expect(dead_code))]
23
23
struct CfgT;
24
24
25
+ #[allow(clippy::allow_attributes, unused)]
26
+ struct Allowed;
27
+
28
+ #[expect(clippy::allow_attributes)]
29
+ #[allow(unused)]
30
+ struct Expected;
31
+
25
32
fn ignore_external() {
26
33
external! {
27
34
#[allow(clippy::needless_borrow)] // Should not lint
Original file line number Diff line number Diff line change @@ -22,6 +22,13 @@ struct T4;
22
22
#[ cfg_attr( panic = "unwind" , allow( dead_code) ) ]
23
23
struct CfgT ;
24
24
25
+ #[ allow( clippy:: allow_attributes, unused) ]
26
+ struct Allowed ;
27
+
28
+ #[ expect( clippy:: allow_attributes) ]
29
+ #[ allow( unused) ]
30
+ struct Expected ;
31
+
25
32
fn ignore_external ( ) {
26
33
external ! {
27
34
#[ 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
-
8
1
error: `clippy::restriction` is not meant to be enabled as a group
9
2
--> $DIR/blanket_clippy_restriction_lints.rs:6:9
10
3
|
11
4
LL | #![warn(clippy::restriction)]
12
5
| ^^^^^^^^^^^^^^^^^^^
13
6
|
14
7
= 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)]`
15
10
16
11
error: `clippy::restriction` is not meant to be enabled as a group
17
12
--> $DIR/blanket_clippy_restriction_lints.rs:8:9
@@ -29,5 +24,10 @@ LL | #![forbid(clippy::restriction)]
29
24
|
30
25
= help: enable the restriction lints you need individually
31
26
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
+
32
32
error: aborting due to 4 previous errors
33
33
You can’t perform that action at this time.
0 commit comments