Skip to content

Commit

Permalink
Allow unused fields in some tests
Browse files Browse the repository at this point in the history
The dead_code lint was previously eroneously missing those.
Since this lint bug has been fixed, the unused fields need
to be marked #[allow(dead_code)].
  • Loading branch information
krtab committed Jan 4, 2024
1 parent f0e21ff commit 4521396
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
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
1 change: 1 addition & 0 deletions tests/ui/union/union-macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ macro_rules! duplicate {

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

0 comments on commit 4521396

Please sign in to comment.