Skip to content

Commit

Permalink
add test files for issue rust-lang#12436
Browse files Browse the repository at this point in the history
  • Loading branch information
J-ZhengLi committed Mar 15, 2024
1 parent 88e1770 commit c6f794a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/ui/mixed_attributes_style/auxiliary/submodule.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#[allow(unused)]
mod foo {
#![allow(dead_code)]
}
7 changes: 7 additions & 0 deletions tests/ui/mixed_attributes_style/global_allow.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// issue 12436
#![allow(clippy::mixed_attributes_style)]

#[path = "auxiliary/submodule.rs"]
mod submodule;

fn main() {}
13 changes: 13 additions & 0 deletions tests/ui/mixed_attributes_style/global_allow.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
error: item has both inner and outer attributes
--> tests/ui/mixed_attributes_style/auxiliary/submodule.rs:1:1
|
LL | / #[allow(unused)]
LL | | mod foo {
LL | | #![allow(dead_code)]
| |________________________^
|
= note: `-D clippy::mixed-attributes-style` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::mixed_attributes_style)]`

error: aborting due to 1 previous error

0 comments on commit c6f794a

Please sign in to comment.