rust/src/test/ui/feature-gates/feature-gate-try_blocks.rs

13 lines
222 B
Rust
Raw Normal View History

// compile-flags: --edition 2018
2019-09-21 16:09:17 -05:00
#[cfg(FALSE)]
fn foo() {
let try_result: Option<_> = try { //~ ERROR `try` blocks are unstable
let x = 5;
x
};
assert_eq!(try_result, Some(5));
}
2019-09-21 16:09:17 -05:00
fn main() {}