about summary refs log tree commit diff
path: root/tests/ui/lint/dead-code/unused-struct-variant.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/lint/dead-code/unused-struct-variant.stderr')
-rw-r--r--tests/ui/lint/dead-code/unused-struct-variant.stderr18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/lint/dead-code/unused-struct-variant.stderr b/tests/ui/lint/dead-code/unused-struct-variant.stderr
new file mode 100644
index 00000000000..d26dd3aff95
--- /dev/null
+++ b/tests/ui/lint/dead-code/unused-struct-variant.stderr
@@ -0,0 +1,18 @@
+error: variant `Bar` is never constructed
+  --> $DIR/unused-struct-variant.rs:8:5
+   |
+LL | enum E {
+   |      - variant in this enum
+LL |     Foo(F),
+LL |     Bar(B),
+   |     ^^^
+   |
+note: the lint level is defined here
+  --> $DIR/unused-struct-variant.rs:1:9
+   |
+LL | #![deny(unused)]
+   |         ^^^^^^
+   = note: `#[deny(dead_code)]` implied by `#[deny(unused)]`
+
+error: aborting due to previous error
+