diff --git a/tests/ui/mixed_attributes_style.rs b/tests/ui/mixed_attributes_style.rs index 4f89aa8a5e55..9f39949110cf 100644 --- a/tests/ui/mixed_attributes_style.rs +++ b/tests/ui/mixed_attributes_style.rs @@ -38,3 +38,18 @@ mod bar { fn main() { // test code goes here } + +// issue #12435 +#[cfg(test)] +mod tests { + //! Module doc, don't lint +} +#[allow(unused)] +mod baz { + //! Module doc, don't lint + const FOO: u8 = 0; +} +/// Module doc, don't lint +mod quz { + #![allow(unused)] +} diff --git a/tests/ui/mixed_attributes_style.stderr b/tests/ui/mixed_attributes_style.stderr index ed798073cb7c..02b19cc98468 100644 --- a/tests/ui/mixed_attributes_style.stderr +++ b/tests/ui/mixed_attributes_style.stderr @@ -26,5 +26,29 @@ LL | | mod bar { LL | | #![allow(unused)] | |_____________________^ -error: aborting due to 3 previous errors +error: item has both inner and outer attributes + --> tests/ui/mixed_attributes_style.rs:43:1 + | +LL | / #[cfg(test)] +LL | | mod tests { +LL | | //! Module doc, don't lint + | |______________________________^ + +error: item has both inner and outer attributes + --> tests/ui/mixed_attributes_style.rs:47:1 + | +LL | / #[allow(unused)] +LL | | mod baz { +LL | | //! Module doc, don't lint + | |______________________________^ + +error: item has both inner and outer attributes + --> tests/ui/mixed_attributes_style.rs:52:1 + | +LL | / /// Module doc, don't lint +LL | | mod quz { +LL | | #![allow(unused)] + | |_____________________^ + +error: aborting due to 6 previous errors