]> git.lizzy.rs Git - rust.git/blob - src/test/ui/never_type/never_coercions.rs
Merge commit 'e36a20c24f35a4cee82bbdc600289104c9237c22' into ra-sync-and-pms-component
[rust.git] / src / test / 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 }