]> git.lizzy.rs Git - rust.git/blob - src/test/ui/never_type/never_coercions.rs
Merge commit '4c41a222ca5d1325fb4b6709395bd06e766cc042' into clippyup
[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 }