6 // error for a `Try` type on a non-`Try` fn
7 std::fs::File::open("foo")?; //~ ERROR the `?` operator can only
9 // a non-`Try` type on a non-`Try` fn
10 ()?; //~ ERROR the `?` operator can only
12 // an unrelated use of `Try`
13 try_trait_generic::<()>(); //~ ERROR the trait bound
18 fn try_trait_generic<T: Try>() -> T {
19 // and a non-`Try` object on a `Try` fn.
20 ()?; //~ ERROR the `?` operator can only be applied to values that implement `Try`