rust/tests/ui/lint/dead-code/trait-impl.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
208 B
Rust
Raw Permalink Normal View History

//@ 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] {}