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