summaryrefslogtreecommitdiffstats
path: root/tests/ui/deprecation/try-macro-suggestion.rs
blob: 635ceac0b199ede4debc7d089b319e6f65c109a7 (plain)
1
2
3
4
5
6
7
8
9
// compile-flags: --edition 2018
fn foo() -> Result<(), ()> {
    Ok(try!()); //~ ERROR use of deprecated `try` macro
    Ok(try!(Ok(()))) //~ ERROR use of deprecated `try` macro
}

fn main() {
    let _ = foo();
}