]> git.lizzy.rs Git - rust.git/blob - tests/ui/never_type/never_coercions.rs
Rollup merge of #107615 - notriddle:notriddle/nbsp, r=GuillaumeGomez
[rust.git] / tests / ui / never_type / never_coercions.rs
1 // run-pass
2 // Test that having something of type ! doesn't screw up type-checking and that it coerces to the
3 // LUB type of the other match arms.
4
5 fn main() {
6     let v: Vec<u32> = Vec::new();
7     match 0u32 {
8         0 => &v,
9         1 => return,
10         _ => &v[..],
11     };
12 }