about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-07-30 12:23:41 -0400
committerMichael Goulet <michael@errs.io>2024-08-03 07:57:31 -0400
commita57b8b91dbcb1cc3768c0a2a2a0c4971ed01b2f0 (patch)
treef29d369e7f43edf7300a82e30c4f6dc23d275973 /tests
parentcbd27db9a996661792bbbd1dde7ac476eded8340 (diff)
downloadrust-a57b8b91dbcb1cc3768c0a2a2a0c4971ed01b2f0.tar.gz
rust-a57b8b91dbcb1cc3768c0a2a2a0c4971ed01b2f0.zip
Bless test fallout
Diffstat (limited to 'tests')
-rw-r--r--tests/ui-fulldeps/deriving-global.rs3
-rw-r--r--tests/ui-fulldeps/deriving-hygiene.rs1
-rw-r--r--tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.rs2
-rw-r--r--tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.stderr10
-rw-r--r--tests/ui/pub/pub-ident-struct-4.stderr4
5 files changed, 14 insertions, 6 deletions
diff --git a/tests/ui-fulldeps/deriving-global.rs b/tests/ui-fulldeps/deriving-global.rs
index 7783010be44..0ba149c9ad6 100644
--- a/tests/ui-fulldeps/deriving-global.rs
+++ b/tests/ui-fulldeps/deriving-global.rs
@@ -17,18 +17,21 @@ mod submod {
     // if any of these are implemented without global calls for any
     // function calls, then being in a submodule will (correctly)
     // cause errors about unrecognised module `std` (or `extra`)
+    #[allow(dead_code)]
     #[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Encodable, Decodable)]
     enum A {
         A1(usize),
         A2(isize),
     }
 
+    #[allow(dead_code)]
     #[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Encodable, Decodable)]
     struct B {
         x: usize,
         y: isize,
     }
 
+    #[allow(dead_code)]
     #[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Encodable, Decodable)]
     struct C(usize, isize);
 }
diff --git a/tests/ui-fulldeps/deriving-hygiene.rs b/tests/ui-fulldeps/deriving-hygiene.rs
index a3a6f9e022e..f948d6ac544 100644
--- a/tests/ui-fulldeps/deriving-hygiene.rs
+++ b/tests/ui-fulldeps/deriving-hygiene.rs
@@ -20,6 +20,7 @@ pub const s: u8 = 1;
 pub const state: u8 = 1;
 pub const cmp: u8 = 1;
 
+#[allow(dead_code)]
 #[derive(Ord, Eq, PartialOrd, PartialEq, Debug, Decodable, Encodable, Hash)]
 struct Foo {}
 
diff --git a/tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.rs b/tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.rs
index bf2fc243e81..5b755d62a05 100644
--- a/tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.rs
+++ b/tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.rs
@@ -1,7 +1,7 @@
 #![deny(dead_code)]
 
 struct T1; //~ ERROR struct `T1` is never constructed
-pub struct T2(i32); //~ ERROR struct `T2` is never constructed
+pub struct T2(i32); //~ ERROR field `0` is never read
 struct T3;
 
 trait Trait1 { //~ ERROR trait `Trait1` is never used
diff --git a/tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.stderr b/tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.stderr
index 174096d9398..2441a3f868d 100644
--- a/tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.stderr
+++ b/tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.stderr
@@ -10,11 +10,15 @@ note: the lint level is defined here
 LL | #![deny(dead_code)]
    |         ^^^^^^^^^
 
-error: struct `T2` is never constructed
-  --> $DIR/unused-adt-impl-pub-trait-with-assoc-const.rs:4:12
+error: field `0` is never read
+  --> $DIR/unused-adt-impl-pub-trait-with-assoc-const.rs:4:15
    |
 LL | pub struct T2(i32);
-   |            ^^
+   |            -- ^^^
+   |            |
+   |            field in this struct
+   |
+   = help: consider removing this field
 
 error: trait `Trait1` is never used
   --> $DIR/unused-adt-impl-pub-trait-with-assoc-const.rs:7:7
diff --git a/tests/ui/pub/pub-ident-struct-4.stderr b/tests/ui/pub/pub-ident-struct-4.stderr
index e04fff1ebf4..04965a1a737 100644
--- a/tests/ui/pub/pub-ident-struct-4.stderr
+++ b/tests/ui/pub/pub-ident-struct-4.stderr
@@ -1,8 +1,8 @@
 error: missing `struct` for struct definition
-  --> $DIR/pub-ident-struct-4.rs:3:4
+  --> $DIR/pub-ident-struct-4.rs:3:1
    |
 LL | pub T(#[allow(dead_code)] String);
-   |    ^
+   | ^^^^^
    |
 help: add `struct` here to parse `T` as a struct
    |