File tree Expand file tree Collapse file tree 2 files changed +69
-0
lines changed Expand file tree Collapse file tree 2 files changed +69
-0
lines changed Original file line number Diff line number Diff line change 1+ #![ warn( clippy:: mixed_attributes_style) ]
2+
3+ #[ allow( unused) ] //~ ERROR: item has both inner and outer attributes
4+ fn foo1 ( ) {
5+ #![ allow( unused) ]
6+ }
7+
8+ #[ allow( unused) ]
9+ #[ allow( unused) ]
10+ fn foo2 ( ) { }
11+
12+ fn foo3 ( ) {
13+ #![ allow( unused) ]
14+ #![ allow( unused) ]
15+ }
16+
17+ /// linux
18+ //~^ ERROR: item has both inner and outer attributes
19+ fn foo4 ( ) {
20+ //! windows
21+ }
22+
23+ /// linux
24+ /// windows
25+ fn foo5 ( ) { }
26+
27+ fn foo6 ( ) {
28+ //! linux
29+ //! windows
30+ }
31+
32+ #[ allow( unused) ] //~ ERROR: item has both inner and outer attributes
33+ mod bar {
34+ #![ allow( unused) ]
35+ }
36+
37+ fn main ( ) {
38+ // test code goes here
39+ }
Original file line number Diff line number Diff line change 1+ error: item has both inner and outer attributes
2+ --> tests/ui/mixed_attributes_style.rs:3:1
3+ |
4+ LL | / #[allow(unused)]
5+ LL | | fn foo1() {
6+ LL | | #![allow(unused)]
7+ | |_____________________^
8+ |
9+ = note: `-D clippy::mixed-attributes-style` implied by `-D warnings`
10+ = help: to override `-D warnings` add `#[allow(clippy::mixed_attributes_style)]`
11+
12+ error: item has both inner and outer attributes
13+ --> tests/ui/mixed_attributes_style.rs:17:1
14+ |
15+ LL | / /// linux
16+ LL | |
17+ LL | | fn foo4() {
18+ LL | | //! windows
19+ | |_______________^
20+
21+ error: item has both inner and outer attributes
22+ --> tests/ui/mixed_attributes_style.rs:32:1
23+ |
24+ LL | / #[allow(unused)]
25+ LL | | mod bar {
26+ LL | | #![allow(unused)]
27+ | |_____________________^
28+
29+ error: aborting due to 3 previous errors
30+
You can’t perform that action at this time.
0 commit comments