blob: 87a5a750bf9f56e2fe159beb7e949bc63ce6e6f6 [file] [edit]
// the compiler currently will suggest the user to add `else` in this case
// it shouldn't because `bar` is an irrefutable pattern, the else block would never be valid/useful
// it is currently unmitigated
fn main(){
let foo = 12;
let bar = foo{return;};
//~^ HELP you might have meant to write a diverging block
//~| HELP escape `return` to use it as an identifier
//~| ERROR expected identifier, found keyword `return`
}