2019-03-27 20:47:39 -05:00
|
|
|
//@ run-pass
|
|
|
|
|
|
|
|
#![deny(dead_code)]
|
|
|
|
|
2023-12-27 16:11:58 -06:00
|
|
|
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());
|
|
|
|
}
|