diff options
| author | Arthur Carcano <arthur.carcano@ocamlpro.com> | 2024-02-20 21:20:14 +0100 |
|---|---|---|
| committer | Arthur Carcano <arthur.carcano@ocamlpro.com> | 2024-03-12 10:59:41 +0100 |
| commit | 701dd5bc9d648f5aa2579103b9f8fae4b54f141a (patch) | |
| tree | 7de932d95473242eb99d8ba39c5b998222e31a5e | |
| parent | ccd99b384e3fcd4b1f53f471cced72647bc7c445 (diff) | |
| download | rust-701dd5bc9d648f5aa2579103b9f8fae4b54f141a.tar.gz rust-701dd5bc9d648f5aa2579103b9f8fae4b54f141a.zip | |
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.
| -rw-r--r-- | tests/ui/impl-not-adjacent-to-type.rs | 1 | ||||
| -rw-r--r-- | tests/ui/privacy/suggest-making-field-public.fixed | 2 | ||||
| -rw-r--r-- | tests/ui/privacy/suggest-making-field-public.rs | 2 | ||||
| -rw-r--r-- | tests/ui/union/union-macro.rs | 1 |
4 files changed, 4 insertions, 2 deletions
diff --git a/tests/ui/impl-not-adjacent-to-type.rs b/tests/ui/impl-not-adjacent-to-type.rs index 7fc927b1d64..ccf59ed4393 100644 --- a/tests/ui/impl-not-adjacent-to-type.rs +++ b/tests/ui/impl-not-adjacent-to-type.rs @@ -3,6 +3,7 @@ mod foo { pub struct Point { pub x: i32, + #[allow(dead_code)] pub y: i32, } } diff --git a/tests/ui/privacy/suggest-making-field-public.fixed b/tests/ui/privacy/suggest-making-field-public.fixed index 29dcde88ab4..8a5686aa5e1 100644 --- a/tests/ui/privacy/suggest-making-field-public.fixed +++ b/tests/ui/privacy/suggest-making-field-public.fixed @@ -1,5 +1,5 @@ //@ run-rustfix -mod a { +pub mod a { pub struct A(pub String); } diff --git a/tests/ui/privacy/suggest-making-field-public.rs b/tests/ui/privacy/suggest-making-field-public.rs index c9f04757b2f..63fdb0bce6a 100644 --- a/tests/ui/privacy/suggest-making-field-public.rs +++ b/tests/ui/privacy/suggest-making-field-public.rs @@ -1,5 +1,5 @@ //@ run-rustfix -mod a { +pub mod a { pub struct A(pub(self)String); } diff --git a/tests/ui/union/union-macro.rs b/tests/ui/union/union-macro.rs index 01cba85deb3..729f56de7a0 100644 --- a/tests/ui/union/union-macro.rs +++ b/tests/ui/union/union-macro.rs @@ -15,6 +15,7 @@ macro_rules! duplicate { duplicate! { pub union U { + #[allow(dead_code)] pub a: u8 } } |
