about summary refs log tree commit diff
path: root/tests/ui/parser
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-01-05 04:51:55 +0000
committerbors <bors@rust-lang.org>2024-01-05 04:51:55 +0000
commit5113ed28ea1451a13eae3a05dca0dbabfd56f587 (patch)
treec4edb2a07b2023ac8e393e3c4ce3b30657d5dd05 /tests/ui/parser
parenta59a98024e3fe317e37e218392f5c34e932b2394 (diff)
parent26194a3ffaf14b86e78ddcd0f2f88c609624d14b (diff)
Auto merge of #118297 - shepmaster:warn-dead-tuple-fields, r=WaffleLapkin
Merge `unused_tuple_struct_fields` into `dead_code`

This implicitly upgrades the lint from `allow` to `warn` and places it into the `unused` lint group.

[Discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Moving.20.60unused_tuple_struct_fields.60.20from.20allow.20to.20warn)
Diffstat (limited to 'tests/ui/parser')
-rw-r--r--tests/ui/parser/issues/issue-70388-without-witness.fixed2
-rw-r--r--tests/ui/parser/issues/issue-70388-without-witness.rs2
-rw-r--r--tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed2
-rw-r--r--tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs2
-rw-r--r--tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr6
5 files changed, 7 insertions, 7 deletions
diff --git a/tests/ui/parser/issues/issue-70388-without-witness.fixed b/tests/ui/parser/issues/issue-70388-without-witness.fixed
index 8d981405ea1..58721495dcd 100644
--- a/tests/ui/parser/issues/issue-70388-without-witness.fixed
+++ b/tests/ui/parser/issues/issue-70388-without-witness.fixed
@@ -1,7 +1,7 @@
 // run-rustfix
 // This is for checking if we can apply suggestions as-is.
 
-pub struct Foo(#[allow(unused_tuple_struct_fields)] i32);
+pub struct Foo(#[allow(dead_code)] i32);
 
 fn main() {
     let Foo(..) = Foo(0); //~ ERROR unexpected `...`
diff --git a/tests/ui/parser/issues/issue-70388-without-witness.rs b/tests/ui/parser/issues/issue-70388-without-witness.rs
index bf36073083a..2e679db5464 100644
--- a/tests/ui/parser/issues/issue-70388-without-witness.rs
+++ b/tests/ui/parser/issues/issue-70388-without-witness.rs
@@ -1,7 +1,7 @@
 // run-rustfix
 // This is for checking if we can apply suggestions as-is.
 
-pub struct Foo(#[allow(unused_tuple_struct_fields)] i32);
+pub struct Foo(#[allow(dead_code)] i32);
 
 fn main() {
     let Foo(...) = Foo(0); //~ ERROR unexpected `...`
diff --git a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed
index 227c40e97c0..a09ff3e5417 100644
--- a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed
+++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed
@@ -1,7 +1,7 @@
 // Regression test for issues #100790 and #106439.
 // run-rustfix
 
-pub struct Example(usize)
+pub struct Example(#[allow(dead_code)] usize)
 where
     (): Sized;
 //~^^^ ERROR where clauses are not allowed before tuple struct bodies
diff --git a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs
index 3699e6fe572..e86f2a8acb8 100644
--- a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs
+++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs
@@ -4,7 +4,7 @@
 pub struct Example
 where
     (): Sized,
-(usize);
+(#[allow(dead_code)] usize);
 //~^^^ ERROR where clauses are not allowed before tuple struct bodies
 
 struct _Demo
diff --git a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr
index 18aa5fadb6b..ddbf237e866 100644
--- a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr
+++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr
@@ -6,12 +6,12 @@ LL |   pub struct Example
 LL | / where
 LL | |     (): Sized,
    | |______________^ unexpected where clause
-LL |   (usize);
-   |   ------- the struct body
+LL |   (#[allow(dead_code)] usize);
+   |   --------------------------- the struct body
    |
 help: move the body before the where clause
    |
-LL ~ pub struct Example(usize)
+LL ~ pub struct Example(#[allow(dead_code)] usize)
 LL | where
 LL ~     (): Sized;
    |