1 // ignore-cloudabi no std::fs support
8 // error for a `Try` type on a non-`Try` fn
9 std::fs::File::open("foo")?; //~ ERROR the `?` operator can only
11 // a non-`Try` type on a non-`Try` fn
12 ()?; //~ ERROR the `?` operator can only
14 // an unrelated use of `Try`
15 try_trait_generic::<()>(); //~ ERROR the trait bound
20 fn try_trait_generic<T: Try>() -> T {
21 // and a non-`Try` object on a `Try` fn.
22 ()?; //~ ERROR the `?` operator can only