rust/tests/ui/lint/dead-code/alias-in-pat.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
176 B
Rust
Raw Normal View History

// run-pass
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 }));
}