Skip to content

Commit 5960f7a

Browse files
committed
UI test updates for Result and Option method moves
1 parent dc32916 commit 5960f7a

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ LL | let _result = &mut Some(42).as_deref_mut();
55
| ^^^^^^^^^^^^ method cannot be called on `Option<{integer}>` due to unsatisfied trait bounds
66
|
77
= note: the following trait bounds were not satisfied:
8-
`{integer}: DerefMut`
98
`{integer}: Deref`
109

1110
error: aborting due to previous error

src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ LL | let _result = &mut Ok(42).as_deref_mut();
55
| ^^^^^^^^^^^^ method cannot be called on `Result<{integer}, _>` due to unsatisfied trait bounds
66
|
77
= note: the following trait bounds were not satisfied:
8-
`{integer}: DerefMut`
98
`{integer}: Deref`
109

1110
error: aborting due to previous error

src/test/ui/mismatched_types/method-help-unsatisfied-bound.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ struct Foo;
33
fn main() {
44
let a: Result<(), Foo> = Ok(());
55
a.unwrap();
6-
//~^ ERROR the method
6+
//~^ ERROR `Foo` doesn't implement `Debug`
77
}
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
error[E0599]: the method `unwrap` exists for enum `Result<(), Foo>`, but its trait bounds were not satisfied
1+
error[E0277]: `Foo` doesn't implement `Debug`
22
--> $DIR/method-help-unsatisfied-bound.rs:5:7
33
|
4-
LL | struct Foo;
5-
| ----------- doesn't satisfy `Foo: Debug`
6-
...
74
LL | a.unwrap();
8-
| ^^^^^^ method cannot be called on `Result<(), Foo>` due to unsatisfied trait bounds
5+
| ^^^^^^ `Foo` cannot be formatted using `{:?}`
96
|
10-
= note: the following trait bounds were not satisfied:
11-
`Foo: Debug`
12-
help: consider annotating `Foo` with `#[derive(Debug)]`
13-
|
14-
LL | #[derive(Debug)]
7+
= help: the trait `Debug` is not implemented for `Foo`
8+
= note: add `#[derive(Debug)]` to `Foo` or manually `impl Debug for Foo`
9+
note: required by a bound in `Result::<T, E>::unwrap`
10+
--> $SRC_DIR/core/src/result.rs:LL:COL
1511
|
12+
LL | E: fmt::Debug,
13+
| ^^^^^^^^^^ required by this bound in `Result::<T, E>::unwrap`
1614

1715
error: aborting due to previous error
1816

19-
For more information about this error, try `rustc --explain E0599`.
17+
For more information about this error, try `rustc --explain E0277`.

0 commit comments

Comments
 (0)