]> git.lizzy.rs Git - rust.git/blob - src/test/ui/return/return-from-diverging.rs
Rollup merge of #93813 - xldenis:public-mir-passes, r=wesleywiser
[rust.git] / src / test / ui / return / return-from-diverging.rs
1 // Test that return another type in place of ! raises a type mismatch.
2
3 fn fail() -> ! {
4     return "wow"; //~ ERROR mismatched types
5 }
6
7 fn main() {
8 }