]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/closure-return-syntax.rs
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / parser / closure-return-syntax.rs
1 // Test that we cannot parse a closure with an explicit return type
2 // unless it uses braces.
3
4 fn main() {
5     let x = || -> i32 22;
6     //~^ ERROR expected `{`, found `22`
7 }