Skip to content

Commit d1544d4

Browse files
committed
Remove clippy_lints from useless attribute test
1 parent 865f5c7 commit d1544d4

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

tests/ui/auxiliary/proc_macro_derive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub fn derive(_: TokenStream) -> TokenStream {
1616
let output = quote! {
1717
// Should not trigger `useless_attribute`
1818
#[allow(dead_code)]
19-
extern crate clippy_lints;
19+
extern crate rustc;
2020
};
2121
output
2222
}

tests/ui/useless_attribute.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22

33
#![warn(clippy::useless_attribute)]
44
#![warn(unreachable_pub)]
5+
#![feature(rustc_private)]
56

67
#[allow(dead_code)]
78
#[cfg_attr(feature = "cargo-clippy", allow(dead_code))]
89
#[rustfmt::skip]
9-
#[cfg_attr(feature = "cargo-clippy",
10-
allow(dead_code))]
1110
#[allow(unused_imports)]
1211
#[allow(unused_extern_crates)]
1312
#[macro_use]
14-
extern crate clippy_lints;
13+
extern crate rustc;
1514

1615
#[macro_use]
1716
extern crate proc_macro_derive;

tests/ui/useless_attribute.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: useless lint attribute
2-
--> $DIR/useless_attribute.rs:6:1
2+
--> $DIR/useless_attribute.rs:7:1
33
|
44
LL | #[allow(dead_code)]
55
| ^^^^^^^^^^^^^^^^^^^ help: if you just forgot a `!`, use: `#![allow(dead_code)]`
66
|
77
= note: `-D clippy::useless-attribute` implied by `-D warnings`
88

99
error: useless lint attribute
10-
--> $DIR/useless_attribute.rs:7:1
10+
--> $DIR/useless_attribute.rs:8:1
1111
|
1212
LL | #[cfg_attr(feature = "cargo-clippy", allow(dead_code))]
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you just forgot a `!`, use: `#![cfg_attr(feature = "cargo-clippy", allow(dead_code)`

0 commit comments

Comments
 (0)