Run rustfix test for 103317 case

This commit is contained in:
Kitsu 2022-10-29 18:44:24 +03:00
parent 6a065f78c4
commit 137271ad73
3 changed files with 18 additions and 3 deletions

View File

@ -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() {}

View File

@ -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),

View File

@ -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)]
| ^^^^^^^^^^^^^^^