Skip to content

Commit d0cdaae

Browse files
committed
wtf did we do to cause this
1 parent d39d5c1 commit d0cdaae

2 files changed

Lines changed: 32 additions & 6 deletions

File tree

tests/ui/impl-trait/two_tait_defining_each_other2.next.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
error[E0282]: type annotations needed
2-
--> $DIR/two_tait_defining_each_other2.rs:12:8
3-
|
4-
LL | fn muh(x: A) -> B {
5-
| ^ cannot infer type
62

73
error: aborting due to 1 previous error
84

tests/ui/impl-trait/unsized_coercion3.next.stderr

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,37 @@ help: the trait `Trait` is implemented for `u32`
99
|
1010
LL | impl Trait for u32 {}
1111
| ^^^^^^^^^^^^^^^^^^
12+
note: required by a bound in `Box`
13+
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
1214

13-
error: aborting due to 1 previous error
15+
error[E0308]: mismatched types
16+
--> $DIR/unsized_coercion3.rs:18:5
17+
|
18+
LL | fn hello() -> Box<impl Trait + ?Sized> {
19+
| ------------------------
20+
| | |
21+
| | the expected opaque type
22+
| expected `Box<impl Trait + ?Sized>` because of return type
23+
...
24+
LL | Box::new(1u32)
25+
| ^^^^^^^^^^^^^^ types differ
26+
|
27+
= note: expected struct `Box<impl Trait + ?Sized>`
28+
found struct `Box<u32>`
29+
30+
error[E0277]: the trait bound `dyn Send: Trait` is not satisfied
31+
--> $DIR/unsized_coercion3.rs:11:1
32+
|
33+
LL | fn hello() -> Box<impl Trait + ?Sized> {
34+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `dyn Send`
35+
|
36+
help: the trait `Trait` is implemented for `u32`
37+
--> $DIR/unsized_coercion3.rs:9:1
38+
|
39+
LL | impl Trait for u32 {}
40+
| ^^^^^^^^^^^^^^^^^^
41+
42+
error: aborting due to 3 previous errors
1443

15-
For more information about this error, try `rustc --explain E0277`.
44+
Some errors have detailed explanations: E0277, E0308.
45+
For more information about an error, try `rustc --explain E0277`.

0 commit comments

Comments
 (0)