summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/dead-code/alias-in-pat.rs
blob: 69d455f3b60e0a60077b00e75f5722143704b413 (plain)
1
2
3
4
5
6
7
8
9
10
// run-pass

#![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 }));
}