diff options
Diffstat (limited to 'tests/ui/lint/dead-code/unused-variant-pub.rs')
-rw-r--r-- | tests/ui/lint/dead-code/unused-variant-pub.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/lint/dead-code/unused-variant-pub.rs b/tests/ui/lint/dead-code/unused-variant-pub.rs new file mode 100644 index 000000000..3a9061340 --- /dev/null +++ b/tests/ui/lint/dead-code/unused-variant-pub.rs @@ -0,0 +1,14 @@ +// build-pass +#![deny(unused)] + +pub struct F; +pub struct B; + +pub enum E { + Foo(F), + Bar(B), +} + +fn main() { + let _ = E::Foo(F); +} |