about summary refs log tree commit diff
path: root/tests/ui/deprecation/try-macro-suggestion.rs
blob: 0775f0011001fc1c5f7472cd97096056ab44afdd (plain)
1
2
3
4
5
6
7
8
9
//@ 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();
}