summaryrefslogtreecommitdiffstats
path: root/src/test/ui/return/return-from-diverging.rs
blob: 2ee48e7bc4762e6a55c50510ee09e906a8e53cde (plain)
1
2
3
4
5
6
7
8
// Test that return another type in place of ! raises a type mismatch.

fn fail() -> ! {
    return "wow"; //~ ERROR mismatched types
}

fn main() {
}