File tree 2 files changed +40
-1
lines changed
2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -38,3 +38,18 @@ mod bar {
38
38
fn main ( ) {
39
39
// test code goes here
40
40
}
41
+
42
+ // issue #12435
43
+ #[ cfg( test) ]
44
+ mod tests {
45
+ //! Module doc, don't lint
46
+ }
47
+ #[ allow( unused) ]
48
+ mod baz {
49
+ //! Module doc, don't lint
50
+ const FOO : u8 = 0 ;
51
+ }
52
+ /// Module doc, don't lint
53
+ mod quz {
54
+ #![ allow( unused) ]
55
+ }
Original file line number Diff line number Diff line change @@ -26,5 +26,29 @@ LL | | mod bar {
26
26
LL | | #![allow(unused)]
27
27
| |_____________________^
28
28
29
- error: aborting due to 3 previous errors
29
+ error: item has both inner and outer attributes
30
+ --> tests/ui/mixed_attributes_style.rs:43:1
31
+ |
32
+ LL | / #[cfg(test)]
33
+ LL | | mod tests {
34
+ LL | | //! Module doc, don't lint
35
+ | |______________________________^
36
+
37
+ error: item has both inner and outer attributes
38
+ --> tests/ui/mixed_attributes_style.rs:47:1
39
+ |
40
+ LL | / #[allow(unused)]
41
+ LL | | mod baz {
42
+ LL | | //! Module doc, don't lint
43
+ | |______________________________^
44
+
45
+ error: item has both inner and outer attributes
46
+ --> tests/ui/mixed_attributes_style.rs:52:1
47
+ |
48
+ LL | / /// Module doc, don't lint
49
+ LL | | mod quz {
50
+ LL | | #![allow(unused)]
51
+ | |_____________________^
52
+
53
+ error: aborting due to 6 previous errors
30
54
You can’t perform that action at this time.
0 commit comments