From 137271ad73585428bf0a69271a888f81c254c8c4 Mon Sep 17 00:00:00 2001 From: Kitsu Date: Sat, 29 Oct 2022 18:44:24 +0300 Subject: [PATCH] Run rustfix test for 103317 case --- src/test/ui/lint/issue-103317.fixed | 14 ++++++++++++++ src/test/ui/lint/issue-103317.rs | 3 ++- src/test/ui/lint/issue-103317.stderr | 4 ++-- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 src/test/ui/lint/issue-103317.fixed diff --git a/src/test/ui/lint/issue-103317.fixed b/src/test/ui/lint/issue-103317.fixed new file mode 100644 index 00000000000..5a987423e5b --- /dev/null +++ b/src/test/ui/lint/issue-103317.fixed @@ -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() {} diff --git a/src/test/ui/lint/issue-103317.rs b/src/test/ui/lint/issue-103317.rs index b39b441a0cf..c2ba939e13c 100644 --- a/src/test/ui/lint/issue-103317.rs +++ b/src/test/ui/lint/issue-103317.rs @@ -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), diff --git a/src/test/ui/lint/issue-103317.stderr b/src/test/ui/lint/issue-103317.stderr index 9fdd6a570e6..9c982ddc346 100644 --- a/src/test/ui/lint/issue-103317.stderr +++ b/src/test/ui/lint/issue-103317.stderr @@ -1,5 +1,5 @@ warning: unreachable `pub` item - --> $DIR/issue-103317.rs:6:5 + --> $DIR/issue-103317.rs:7:5 | LL | pub enum T { | ---^^^^^^^ @@ -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)] | ^^^^^^^^^^^^^^^