]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/closure-return-syntax.rs
Merge commit '0969bc6dde001e01e7e1f58c8ccd7750f8a49ae1' into sync_cg_clif-2021-03-29
[rust.git] / src / test / 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 }