rust/src/test/ui/feature-gates/feature-gate-try_blocks.rs
Eduard-Mihai Burtescu 8645ac4218 Revert "pre-expansion gate try_blocks"
This reverts commit 1935ba658c.
2019-10-31 19:08:11 +02:00

10 lines
206 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));
}