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

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

18 lines
224 B
Rust
Raw Normal View History

2019-03-27 20:47:39 -05:00
//@ run-pass
#![deny(dead_code)]
pub struct GenericFoo<T>(#[allow(dead_code)] T);
2019-03-27 20:47:39 -05:00
type Foo = GenericFoo<u32>;
impl Foo {
fn bar(self) -> u8 {
0
}
}
fn main() {
println!("{}", GenericFoo(0).bar());
}