Skip to content
Prev Previous commit
Next Next commit
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.
  • Loading branch information
krtab committed Mar 12, 2024
commit 701dd5bc9d648f5aa2579103b9f8fae4b54f141a
1 change: 1 addition & 0 deletions tests/ui/impl-not-adjacent-to-type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
mod foo {
pub struct Point {
pub x: i32,
#[allow(dead_code)]
pub y: i32,
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/privacy/suggest-making-field-public.fixed
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@ run-rustfix
mod a {
pub mod a {
pub struct A(pub String);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/privacy/suggest-making-field-public.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@ run-rustfix
mod a {
pub mod a {
pub struct A(pub(self)String);
}

Expand Down
1 change: 1 addition & 0 deletions tests/ui/union/union-macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ macro_rules! duplicate {

duplicate! {
pub union U {
#[allow(dead_code)]
pub a: u8
}
}
Expand Down