Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com> Co-Authored-By: Oliver Middleton <olliemail27@gmail.com>
17 lines
330 B
Rust
17 lines
330 B
Rust
// 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() { }
|