2018-05-24 17:27:36 -05:00
|
|
|
#![feature(never_type)]
|
|
|
|
|
|
|
|
fn main() {
|
2018-05-25 09:31:13 -05: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 11:31:45 -05:00
|
|
|
let _: ! = {
|
|
|
|
while false { //~ ERROR mismatched types
|
2018-05-25 09:31:13 -05:00
|
|
|
break
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
if false {
|
2018-05-25 11:31:45 -05:00
|
|
|
let _: ! = {
|
|
|
|
while false { //~ ERROR mismatched types
|
2018-05-25 09:31:13 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
2018-05-24 17:27:36 -05:00
|
|
|
}
|