Files
rust/tests/ui/parser/closure-return-syntax.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1020 B
Plaintext
Raw Normal View History

error: expected `{`, found `22`
--> $DIR/closure-return-syntax.rs:5:23
2018-10-20 23:36:17 +03:00
|
LL | let x = || -> i32 22;
| ^^ expected `{`
|
2024-11-16 00:22:54 +00:00
help: you might have meant to write this as part of a block
|
LL | let x = || -> i32 { 22 };
| + +
2018-10-20 23:36:17 +03:00
error: expected `{`, found `(`
--> $DIR/closure-return-syntax.rs:12:34
|
LL | let x = || -> (i32, i32) (1, 2);
| ^ expected `{`
|
help: you might have meant to write this as part of a block
|
LL | let x = || -> (i32, i32) { (1, 2) };
| + +
error: expected `{`, found `[`
--> $DIR/closure-return-syntax.rs:17:32
|
LL | let c = || -> [i32; 2] [1, 2];
| ^ expected `{`
|
help: you might have meant to write this as part of a block
|
LL | let c = || -> [i32; 2] { [1, 2] };
| + +
error: aborting due to 3 previous errors
2018-10-20 23:36:17 +03:00