]> git.lizzy.rs Git - rust.git/blob - src/test/ui/never_coercions.rs
Rollup merge of #61207 - taiki-e:arbitrary_self_types-lifetime-elision-2, r=Centril
[rust.git] / src / test / ui / 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 }