Allow unused fields in some tests

The dead_code lint was previously eroneously missing those.
Since this lint bug has been fixed, the unused fields warnings need
to be fixed.

Most of them are marked as `#[allow(dead_code)]`. Other warnings are
fixed by changing visibility of modules.
This commit is contained in:
Arthur Carcano 2024-02-20 21:20:14 +01:00
parent ccd99b384e
commit 701dd5bc9d
4 changed files with 4 additions and 2 deletions

View File

@ -3,6 +3,7 @@
mod foo {
pub struct Point {
pub x: i32,
#[allow(dead_code)]
pub y: i32,
}
}

View File

@ -1,5 +1,5 @@
//@ run-rustfix
mod a {
pub mod a {
pub struct A(pub String);
}

View File

@ -1,5 +1,5 @@
//@ run-rustfix
mod a {
pub mod a {
pub struct A(pub(self)String);
}

View File

@ -15,6 +15,7 @@ mod m2 {
duplicate! {
pub union U {
#[allow(dead_code)]
pub a: u8
}
}