rust/src/test/run-pass/dead-code-alias-in-pat.rs

9 lines
163 B
Rust
Raw Normal View History

2017-10-30 21:57:40 -05:00
#![deny(dead_code)]
fn main() {
struct Foo<T> { x: T }
type Bar = Foo<u32>;
let spam = |Bar { x }| x != 0;
println!("{}", spam(Foo { x: 10 }));
}