UI test updates for Result and Option method moves
This commit is contained in:
parent
dc3291614a
commit
5960f7a617
@ -5,7 +5,6 @@ LL | let _result = &mut Some(42).as_deref_mut();
|
||||
| ^^^^^^^^^^^^ method cannot be called on `Option<{integer}>` due to unsatisfied trait bounds
|
||||
|
|
||||
= note: the following trait bounds were not satisfied:
|
||||
`{integer}: DerefMut`
|
||||
`{integer}: Deref`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -5,7 +5,6 @@ LL | let _result = &mut Ok(42).as_deref_mut();
|
||||
| ^^^^^^^^^^^^ method cannot be called on `Result<{integer}, _>` due to unsatisfied trait bounds
|
||||
|
|
||||
= note: the following trait bounds were not satisfied:
|
||||
`{integer}: DerefMut`
|
||||
`{integer}: Deref`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -3,5 +3,5 @@ struct Foo;
|
||||
fn main() {
|
||||
let a: Result<(), Foo> = Ok(());
|
||||
a.unwrap();
|
||||
//~^ ERROR the method
|
||||
//~^ ERROR `Foo` doesn't implement `Debug`
|
||||
}
|
||||
|
@ -1,19 +1,17 @@
|
||||
error[E0599]: the method `unwrap` exists for enum `Result<(), Foo>`, but its trait bounds were not satisfied
|
||||
error[E0277]: `Foo` doesn't implement `Debug`
|
||||
--> $DIR/method-help-unsatisfied-bound.rs:5:7
|
||||
|
|
||||
LL | struct Foo;
|
||||
| ----------- doesn't satisfy `Foo: Debug`
|
||||
...
|
||||
LL | a.unwrap();
|
||||
| ^^^^^^ method cannot be called on `Result<(), Foo>` due to unsatisfied trait bounds
|
||||
| ^^^^^^ `Foo` cannot be formatted using `{:?}`
|
||||
|
|
||||
= note: the following trait bounds were not satisfied:
|
||||
`Foo: Debug`
|
||||
help: consider annotating `Foo` with `#[derive(Debug)]`
|
||||
|
|
||||
LL | #[derive(Debug)]
|
||||
= help: the trait `Debug` is not implemented for `Foo`
|
||||
= note: add `#[derive(Debug)]` to `Foo` or manually `impl Debug for Foo`
|
||||
note: required by a bound in `Result::<T, E>::unwrap`
|
||||
--> $SRC_DIR/core/src/result.rs:LL:COL
|
||||
|
|
||||
LL | E: fmt::Debug,
|
||||
| ^^^^^^^^^^ required by this bound in `Result::<T, E>::unwrap`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0599`.
|
||||
For more information about this error, try `rustc --explain E0277`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user