From 35130d7233e939cc9a6fd8b72a4baee2eb59c3b2 Mon Sep 17 00:00:00 2001 From: r0cky Date: Wed, 5 Jun 2024 23:20:09 +0800 Subject: Detect pub structs never constructed and unused associated constants in traits --- tests/ui/derives/clone-debug-dead-code-in-the-same-struct.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/ui/derives/clone-debug-dead-code-in-the-same-struct.rs') 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: (), -- cgit 1.4.1-3-g733a5