summaryrefslogtreecommitdiffstats
path: root/src/test/ui/match/match-join.rs
blob: b0f2593c85364239ab422a3feb86d862913ee619 (plain)
1
2
3
4
5
6
7
8
9
10
11
// a good test that we merge paths correctly in the presence of a
// variable that's used before it's declared

fn my_panic() -> ! { panic!(); }

fn main() {
    match true { false => { my_panic(); } true => { } }

    println!("{}", x); //~ ERROR cannot find value `x` in this scope
    let x: isize;
}