Skip to content

Commit 701dd5b

Browse files
committed
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.
1 parent ccd99b3 commit 701dd5b

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

tests/ui/impl-not-adjacent-to-type.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
mod foo {
44
pub struct Point {
55
pub x: i32,
6+
#[allow(dead_code)]
67
pub y: i32,
78
}
89
}

tests/ui/privacy/suggest-making-field-public.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-rustfix
2-
mod a {
2+
pub mod a {
33
pub struct A(pub String);
44
}
55

tests/ui/privacy/suggest-making-field-public.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-rustfix
2-
mod a {
2+
pub mod a {
33
pub struct A(pub(self)String);
44
}
55

tests/ui/union/union-macro.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ macro_rules! duplicate {
1515

1616
duplicate! {
1717
pub union U {
18+
#[allow(dead_code)]
1819
pub a: u8
1920
}
2021
}

0 commit comments

Comments
 (0)