Closed
Description
Given:
fn main() -> Result<(), ()> {
let x = try!(Ok(1u8));
Ok(())
}
the compiler emits the standard "reserved keyword error":
error: expected expression, found reserved keyword `try`
--> src/main.rs:2:13
|
2 | let x = try!(Ok(1u8));
| ^^^ expected expression
However, since try!
was once a macro people used (wherefore it stands to reason that some old documentation may folk astray), it might be prudent to catch this pattern somehow and refer the user to the documentation about ?
somewhere.