2020-03-04 19:46:13 -06:00
|
|
|
// edition:2018
|
|
|
|
|
|
|
|
#![feature(try_blocks)]
|
|
|
|
|
|
|
|
fn main() {}
|
|
|
|
|
|
|
|
fn f1() {
|
2020-03-07 02:49:46 -06:00
|
|
|
loop
|
|
|
|
let x = 0; //~ ERROR expected `{`, found keyword `let`
|
|
|
|
drop(0);
|
|
|
|
}
|
2020-03-04 19:46:13 -06:00
|
|
|
|
|
|
|
fn f2() {
|
2020-03-07 02:49:46 -06:00
|
|
|
while true
|
|
|
|
let x = 0; //~ ERROR expected `{`, found keyword `let`
|
|
|
|
}
|
2020-03-04 19:46:13 -06:00
|
|
|
|
|
|
|
fn f3() {
|
2020-03-07 02:49:46 -06:00
|
|
|
for x in 0..1
|
|
|
|
let x = 0; //~ ERROR expected `{`, found keyword `let`
|
|
|
|
}
|
2020-03-04 19:46:13 -06:00
|
|
|
|
|
|
|
fn f4() {
|
2020-03-07 02:49:46 -06:00
|
|
|
try //~ ERROR expected expression, found reserved keyword `try`
|
|
|
|
let x = 0;
|
|
|
|
}
|
2020-03-04 19:46:13 -06:00
|
|
|
|
|
|
|
fn f5() {
|
2020-09-09 17:16:34 -05:00
|
|
|
async
|
2020-03-07 02:49:46 -06:00
|
|
|
let x = 0; //~ ERROR expected one of `move`, `|`, or `||`, found keyword `let`
|
|
|
|
}
|