blob: a7b7d3faf5ee93ae2c694decddca2d1eb79faca6 [file] [log] [blame]
// Test that `try!` macros are rewritten.
// run-rustfix
// build-pass (FIXME(62277): could be check-pass?)
#![warn(rust_2018_compatibility)]
#![allow(unused_variables)]
#![allow(dead_code)]
#![allow(deprecated)]
fn foo() -> Result<usize, ()> {
let x: Result<usize, ()> = Ok(22);
r#try!(x);
Ok(44)
}
fn main() { }