Skip to content

Commit

Permalink
Run rustfix test for 103317 case
Browse files Browse the repository at this point in the history
  • Loading branch information
l4l committed Oct 29, 2022
1 parent 6a065f7 commit 137271a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
14 changes: 14 additions & 0 deletions src/test/ui/lint/issue-103317.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// check-pass
// run-rustfix

#[warn(unreachable_pub)]
mod inner {
#[allow(unused)]
pub(crate) enum T {
//~^ WARN unreachable `pub` item
A(u8),
X { a: f32, b: () },
}
}

fn main() {}
3 changes: 2 additions & 1 deletion src/test/ui/lint/issue-103317.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// check-pass
// run-rustfix

#[warn(unreachable_pub)]
#[allow(unused)]
mod inner {
#[allow(unused)]
pub enum T {
//~^ WARN unreachable `pub` item
A(u8),
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/lint/issue-103317.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
warning: unreachable `pub` item
--> $DIR/issue-103317.rs:6:5
--> $DIR/issue-103317.rs:7:5
|
LL | pub enum T {
| ---^^^^^^^
Expand All @@ -8,7 +8,7 @@ LL | pub enum T {
|
= help: or consider exporting it for use by other crates
note: the lint level is defined here
--> $DIR/issue-103317.rs:3:8
--> $DIR/issue-103317.rs:4:8
|
LL | #[warn(unreachable_pub)]
| ^^^^^^^^^^^^^^^
Expand Down

0 comments on commit 137271a

Please sign in to comment.