Closed
Description
Simple demo that won't compile but should be a type error:
#![feature(try_blocks)]
fn demo() {
return try { 4 };
}
But it gives a parse error instead:
error: expected one of `.`, `;`, `?`, `}`, or an operator, found reserved keyword `try`
--> src/lib.rs:3:12
|
3 | return try { 4 };
| ^^^ expected one of `.`, `;`, `?`, `}`, or an operator
error: aborting due to previous error
(It works if you put parens, like return (try { 4 });
)