about summary refs log tree commit diff
path: root/tests/ui/derives/clone-debug-dead-code-in-the-same-struct.rs
diff options
context:
space:
mode:
authorr0cky <mu001999@outlook.com>2024-06-05 23:20:09 +0800
committerr0cky <mu001999@outlook.com>2024-06-05 23:20:09 +0800
commit35130d7233e939cc9a6fd8b72a4baee2eb59c3b2 (patch)
treeea13e12817d949301828e9ff4f5775ca8ba9a31e /tests/ui/derives/clone-debug-dead-code-in-the-same-struct.rs
parent2a2c29aafa50bf6fe53d66b32070eba59f860ac3 (diff)
downloadrust-35130d7233e939cc9a6fd8b72a4baee2eb59c3b2.tar.gz
rust-35130d7233e939cc9a6fd8b72a4baee2eb59c3b2.zip
Detect pub structs never constructed and unused associated constants in traits
Diffstat (limited to 'tests/ui/derives/clone-debug-dead-code-in-the-same-struct.rs')
-rw-r--r--tests/ui/derives/clone-debug-dead-code-in-the-same-struct.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/derives/clone-debug-dead-code-in-the-same-struct.rs b/tests/ui/derives/clone-debug-dead-code-in-the-same-struct.rs
index 6ab1fb7b039..885dacc727a 100644
--- a/tests/ui/derives/clone-debug-dead-code-in-the-same-struct.rs
+++ b/tests/ui/derives/clone-debug-dead-code-in-the-same-struct.rs
@@ -1,9 +1,9 @@
 #![forbid(dead_code)]
 
 #[derive(Debug)]
-pub struct Whatever {
+pub struct Whatever { //~ ERROR struct `Whatever` is never constructed
     pub field0: (),
-    field1: (), //~ ERROR fields `field1`, `field2`, `field3`, and `field4` are never read
+    field1: (),
     field2: (),
     field3: (),
     field4: (),