summary refs log tree commit diff
path: root/src/test/run-pass/never_coercions.rs
blob: 70f67fd3da1b2be65548263d46bd6eac21e1ab7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Test that having something of type ! doesn't screw up type-checking and that it coerces to the
// LUB type of the other match arms.

fn main() {
    let v: Vec<u32> = Vec::new();
    match 0u32 {
        0 => &v,
        1 => return,
        _ => &v[..],
    };
}