2019-12-11 14:51:28 +00:00
|
|
|
#![feature(never_type)]
|
|
|
|
|
2018-05-24 22:27:36 +00:00
|
|
|
fn main() {
|
2018-05-25 14:31:13 +00:00
|
|
|
// The `if false` expressions are simply to
|
|
|
|
// make sure we don't avoid checking everything
|
|
|
|
// simply because a few expressions are unreachable.
|
|
|
|
|
|
|
|
if false {
|
|
|
|
let _: ! = { //~ ERROR mismatched types
|
|
|
|
'a: while break 'a {};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
if false {
|
2018-05-25 16:31:45 +00:00
|
|
|
let _: ! = {
|
|
|
|
while false { //~ ERROR mismatched types
|
2018-05-25 14:31:13 +00:00
|
|
|
break
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
if false {
|
2018-05-25 16:31:45 +00:00
|
|
|
let _: ! = {
|
|
|
|
while false { //~ ERROR mismatched types
|
2018-05-25 14:31:13 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
2018-05-24 22:27:36 +00:00
|
|
|
}
|