diff options
Diffstat (limited to 'tests/ui/lint/dead-code/trait-impl.rs')
-rw-r--r-- | tests/ui/lint/dead-code/trait-impl.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/lint/dead-code/trait-impl.rs b/tests/ui/lint/dead-code/trait-impl.rs new file mode 100644 index 000000000..92e389a93 --- /dev/null +++ b/tests/ui/lint/dead-code/trait-impl.rs @@ -0,0 +1,19 @@ +// check-pass +#![deny(dead_code)] + +enum Foo { + Bar, +} + +fn main() { + let p = [0; 0]; + p.bar(); +} + +trait Bar { + fn bar(&self) -> usize { + 3 + } +} + +impl Bar for [u32; Foo::Bar as usize] {} |