Bless the UI tests

This commit is contained in:
Scott McMurray 2022-04-24 19:59:23 -07:00
parent 944ba8c8a7
commit 9b5766cd24
5 changed files with 28 additions and 18 deletions

View File

@ -1,15 +1,9 @@
error[E0284]: type annotations needed
--> $DIR/question-mark-type-infer.rs:10:21
error[E0282]: type annotations needed
--> $DIR/question-mark-type-infer.rs:10:30
|
LL | l.iter().map(f).collect()?
| ^^^^^^^ cannot infer type
|
= note: cannot satisfy `<_ as Try>::Residual == _`
help: consider specifying the type argument in the method call
|
LL | l.iter().map(f).collect::<B>()?
| +++++
| ^ cannot infer type
error: aborting due to previous error
For more information about this error, try `rustc --explain E0284`.
For more information about this error, try `rustc --explain E0282`.

View File

@ -7,7 +7,9 @@ LL | Err(5)?;
| ^ the trait `From<{integer}>` is not implemented for `()`
|
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
= help: the trait `FromResidual<Result<Infallible, E>>` is implemented for `Result<T, F>`
= help: the following other types implement trait `FromResidual<R>`:
<Result<T, F> as FromResidual<Result<Infallible, E>>>
<Result<T, F> as FromResidual<Yeet<E>>>
= note: required because of the requirements on the impl of `FromResidual<Result<Infallible, {integer}>>` for `Result<i32, ()>`
error: aborting due to previous error

View File

@ -31,7 +31,9 @@ LL | | }
| |_- this function returns a `Result`
|
= help: the trait `FromResidual<Option<Infallible>>` is not implemented for `Result<u64, String>`
= help: the trait `FromResidual<Result<Infallible, E>>` is implemented for `Result<T, F>`
= help: the following other types implement trait `FromResidual<R>`:
<Result<T, F> as FromResidual<Result<Infallible, E>>>
<Result<T, F> as FromResidual<Yeet<E>>>
error[E0277]: the `?` operator can only be used on `Result`s in a function that returns `Result`
--> $DIR/bad-interconversion.rs:17:31
@ -44,7 +46,9 @@ LL | | }
| |_- this function returns a `Result`
|
= help: the trait `FromResidual<ControlFlow<{integer}, Infallible>>` is not implemented for `Result<u64, String>`
= help: the trait `FromResidual<Result<Infallible, E>>` is implemented for `Result<T, F>`
= help: the following other types implement trait `FromResidual<R>`:
<Result<T, F> as FromResidual<Result<Infallible, E>>>
<Result<T, F> as FromResidual<Yeet<E>>>
error[E0277]: the `?` operator can only be used on `Option`s, not `Result`s, in a function that returns `Option`
--> $DIR/bad-interconversion.rs:22:22
@ -57,7 +61,9 @@ LL | | }
| |_- this function returns an `Option`
|
= help: the trait `FromResidual<Result<Infallible, &str>>` is not implemented for `Option<u16>`
= help: the trait `FromResidual` is implemented for `Option<T>`
= help: the following other types implement trait `FromResidual<R>`:
<Option<T> as FromResidual<Yeet<()>>>
<Option<T> as FromResidual>
error[E0277]: the `?` operator can only be used on `Option`s in a function that returns `Option`
--> $DIR/bad-interconversion.rs:27:33
@ -70,7 +76,9 @@ LL | | }
| |_- this function returns an `Option`
|
= help: the trait `FromResidual<ControlFlow<{integer}, Infallible>>` is not implemented for `Option<u64>`
= help: the trait `FromResidual` is implemented for `Option<T>`
= help: the following other types implement trait `FromResidual<R>`:
<Option<T> as FromResidual<Yeet<()>>>
<Option<T> as FromResidual>
error[E0277]: the `?` operator can only be used on `ControlFlow`s in a function that returns `ControlFlow`
--> $DIR/bad-interconversion.rs:32:39

View File

@ -10,7 +10,9 @@ LL | | }
| |_- this function returns a `Result`
|
= help: the trait `FromResidual<Option<Infallible>>` is not implemented for `Result<(), ()>`
= help: the trait `FromResidual<Result<Infallible, E>>` is implemented for `Result<T, F>`
= help: the following other types implement trait `FromResidual<R>`:
<Result<T, F> as FromResidual<Result<Infallible, E>>>
<Result<T, F> as FromResidual<Yeet<E>>>
error[E0277]: the `?` operator can only be used on `Option`s, not `Result`s, in a function that returns `Option`
--> $DIR/option-to-result.rs:11:6
@ -24,7 +26,9 @@ LL | | }
| |_- this function returns an `Option`
|
= help: the trait `FromResidual<Result<Infallible, i32>>` is not implemented for `Option<i32>`
= help: the trait `FromResidual` is implemented for `Option<T>`
= help: the following other types implement trait `FromResidual<R>`:
<Option<T> as FromResidual<Yeet<()>>>
<Option<T> as FromResidual>
error: aborting due to 2 previous errors

View File

@ -10,7 +10,9 @@ LL | | }
| |_- this function returns a `Result`
|
= help: the trait `FromResidual<Option<Infallible>>` is not implemented for `Result<u32, ()>`
= help: the trait `FromResidual<Result<Infallible, E>>` is implemented for `Result<T, F>`
= help: the following other types implement trait `FromResidual<R>`:
<Result<T, F> as FromResidual<Result<Infallible, E>>>
<Result<T, F> as FromResidual<Yeet<E>>>
error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
--> $DIR/try-on-option.rs:11:6