]> git.lizzy.rs Git - rust.git/blob - tests/ui/never_type/diverging-tuple-parts-39485.rs
Rollup merge of #107615 - notriddle:notriddle/nbsp, r=GuillaumeGomez
[rust.git] / tests / ui / never_type / diverging-tuple-parts-39485.rs
1 // After #39485, this test used to pass, but that change was reverted
2 // due to numerous inference failures like #39808, so it now fails
3 // again. #39485 made it so that diverging types never propagate
4 // upward; but we now do propagate such types upward in many more
5 // cases.
6
7 fn g() {
8     &panic!() //~ ERROR mismatched types
9 }
10
11 fn f() -> isize {
12     (return 1, return 2) //~ ERROR mismatched types
13 }
14
15 fn main() {}