mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-16 21:47:04 +00:00
10 lines
207 B
Rust
10 lines
207 B
Rust
//@ compile-flags: --edition 2018
|
|
|
|
pub fn main() {
|
|
let try_result: Option<_> = try { //~ ERROR `try` expression is experimental
|
|
let x = 5;
|
|
x
|
|
};
|
|
assert_eq!(try_result, Some(5));
|
|
}
|