mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
11 lines
282 B
Rust
11 lines
282 B
Rust
//@ compile-flags: --edition 2015
|
|
|
|
pub fn main() {
|
|
let try_result: Option<_> = try {
|
|
//~^ ERROR expected struct, variant or union type, found macro `try`
|
|
let x = 5; //~ ERROR expected identifier, found keyword
|
|
x
|
|
};
|
|
assert_eq!(try_result, Some(5));
|
|
}
|