Skip to content

Commit c50bee0

Browse files
committed
ui: bless try Into changes
1 parent 3615780 commit c50bee0

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/test/ui/issues/issue-32709.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ error[E0277]: `?` couldn't convert the error to `()`
44
LL | Err(5)?;
55
| ^ the trait `std::convert::From<{integer}>` is not implemented for `()`
66
|
7-
= note: required by `std::convert::From::from`
7+
= note: required because of the requirements on the impl of `std::convert::Into<()>` for `{integer}`
8+
= note: required by `std::convert::Into::into`
89

910
error: aborting due to previous error
1011

src/test/ui/try-block/try-block-bad-type.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ LL | Err("")?;
1010
<i32 as std::convert::From<i8>>
1111
<i32 as std::convert::From<std::num::NonZeroI32>>
1212
and 2 others
13-
= note: required by `std::convert::From::from`
13+
= note: required because of the requirements on the impl of `std::convert::Into<i32>` for `&str`
14+
= note: required by `std::convert::Into::into`
1415

1516
error[E0271]: type mismatch resolving `<std::result::Result<i32, i32> as std::ops::Try>::Ok == &str`
1617
--> $DIR/try-block-bad-type.rs:12:9

src/test/ui/try-on-option.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ error[E0277]: `?` couldn't convert the error to `()`
44
LL | x?;
55
| ^ the trait `std::convert::From<std::option::NoneError>` is not implemented for `()`
66
|
7-
= note: required by `std::convert::From::from`
7+
= note: required because of the requirements on the impl of `std::convert::Into<()>` for `std::option::NoneError`
8+
= note: required by `std::convert::Into::into`
89

910
error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`)
1011
--> $DIR/try-on-option.rs:13:5

0 commit comments

Comments
 (0)