]>
Commit | Line | Data |
---|---|---|
b7449926 XL |
1 | // Test that `try!` macros are rewritten. |
2 | ||
3 | // run-rustfix | |
4 | // compile-pass | |
5 | ||
6 | #![warn(rust_2018_compatibility)] | |
7 | #![allow(unused_variables)] | |
8 | #![allow(dead_code)] | |
9 | ||
10 | fn foo() -> Result<usize, ()> { | |
11 | let x: Result<usize, ()> = Ok(22); | |
12 | r#try!(x); | |
13 | Ok(44) | |
14 | } | |
15 | ||
16 | fn main() { } |