rust/src/test/ui/dead-code-impl.rs
2019-03-28 01:47:39 +00:00

18 lines
203 B
Rust

// run-pass
#![deny(dead_code)]
pub struct GenericFoo<T>(T);
type Foo = GenericFoo<u32>;
impl Foo {
fn bar(self) -> u8 {
0
}
}
fn main() {
println!("{}", GenericFoo(0).bar());
}