]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/dead-code/with-impl.rs
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
[rust.git] / tests / ui / lint / dead-code / with-impl.rs
1 // run-pass
2
3 #![deny(dead_code)]
4
5 pub struct GenericFoo<T>(#[allow(unused_tuple_struct_fields)] T);
6
7 type Foo = GenericFoo<u32>;
8
9 impl Foo {
10     fn bar(self) -> u8 {
11         0
12     }
13 }
14
15 fn main() {
16     println!("{}", GenericFoo(0).bar());
17 }