blob: 2ab5b3e31768cdedbf87ebecc81f7348ba0a32a6 [file] [log] [blame]
error[E0277]: the trait bound `i32: std::convert::From<&str>` is not satisfied
--> $DIR/catch-bad-type.rs:15:9
|
LL | Err("")?; //~ ERROR the trait bound `i32: std::convert::From<&str>` is not satisfied
| ^^^^^^^^ the trait `std::convert::From<&str>` is not implemented for `i32`
|
= help: the following implementations were found:
<i32 as std::convert::From<bool>>
<i32 as std::convert::From<i16>>
<i32 as std::convert::From<i8>>
<i32 as std::convert::From<u16>>
<i32 as std::convert::From<u8>>
= note: required by `std::convert::From::from`
error[E0271]: type mismatch resolving `<std::result::Result<i32, i32> as std::ops::Try>::Ok == &str`
--> $DIR/catch-bad-type.rs:20:9
|
LL | "" //~ ERROR type mismatch
| ^^ expected i32, found &str
|
= note: expected type `i32`
found type `&str`
error[E0271]: type mismatch resolving `<std::result::Result<i32, i32> as std::ops::Try>::Ok == ()`
--> $DIR/catch-bad-type.rs:23:44
|
LL | let res: Result<i32, i32> = do catch { }; //~ ERROR type mismatch
| ^ expected i32, found ()
|
= note: expected type `i32`
found type `()`
error[E0277]: the trait bound `(): std::ops::Try` is not satisfied
--> $DIR/catch-bad-type.rs:25:28
|
LL | let res: () = do catch { }; //~ the trait bound `(): std::ops::Try` is not satisfied
| ^^^ the trait `std::ops::Try` is not implemented for `()`
|
= note: required by `std::ops::Try::from_ok`
error[E0277]: the trait bound `i32: std::ops::Try` is not satisfied
--> $DIR/catch-bad-type.rs:27:29
|
LL | let res: i32 = do catch { 5 }; //~ ERROR the trait bound `i32: std::ops::Try` is not satisfied
| ^^^^^ the trait `std::ops::Try` is not implemented for `i32`
|
= note: required by `std::ops::Try::from_ok`
error: aborting due to 5 previous errors
Some errors occurred: E0271, E0277.
For more information about an error, try `rustc --explain E0271`.