about summary refs log tree commit diff
path: root/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr
diff options
context:
space:
mode:
authorr0cky <mu001999@outlook.com>2024-02-07 10:42:01 +0800
committerr0cky <mu001999@outlook.com>2024-02-07 10:42:01 +0800
commitc7519d42c2664828c98fdb98acab73e9a39b0b97 (patch)
tree87e875c88b08158761df546ea4e88902fbb08d6a /tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr
parent40878ca6ea79d6e55e430846a2de3350a76cd08f (diff)
downloadrust-c7519d42c2664828c98fdb98acab73e9a39b0b97.tar.gz
rust-c7519d42c2664828c98fdb98acab73e9a39b0b97.zip
Update tests
Diffstat (limited to 'tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr')
-rw-r--r--tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr b/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr
index 06f9b229c18..b992005318f 100644
--- a/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr
+++ b/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr
@@ -51,19 +51,13 @@ note: the lint level is defined here
 LL |     #[forbid(dead_code)]
    |              ^^^^^^^^^
 
-warning: field `0` is never read
-  --> $DIR/multiple-dead-codes-in-the-same-struct.rs:20:12
+warning: struct `Foo` is never constructed
+  --> $DIR/multiple-dead-codes-in-the-same-struct.rs:20:8
    |
 LL | struct Foo(usize, #[allow(unused)] usize);
-   |        --- ^^^^^
-   |        |
-   |        field in this struct
+   |        ^^^
    |
    = note: `Foo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
-help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
-   |
-LL | struct Foo((), #[allow(unused)] usize);
-   |            ~~
 
 error: aborting due to 2 previous errors; 2 warnings emitted