fn main() {
struct Foo<T> { x: T }
type Bar = Foo<u32>;
let spam = |Bar { x }| x != 0;
println!("{}", spam(Foo { x: 10 }));
}
warning: type alias is never used: `Bar`
--> ...\test.rs:3:5
|
3 | type Bar = Foo<u32>;
| ^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(dead_code)] on by default
Gives: