@@ -25,7 +25,45 @@ LL | type U = impl Copy;
25
25
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
26
26
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
27
27
28
- error: aborting due to 3 previous errors
28
+ error[E0308]: mismatched types
29
+ --> $DIR/issue-119493-type-error-ice.rs:11:18
30
+ |
31
+ LL | type U = impl Copy;
32
+ | --------- the expected opaque type
33
+ LL |
34
+ LL | let foo: U = Foo(());
35
+ | - ^^^^^^^ expected opaque type, found `Foo`
36
+ | |
37
+ | expected due to this
38
+ |
39
+ = note: expected opaque type `U`
40
+ found struct `Foo`
41
+ note: this item must have the opaque type in its signature in order to be able to register hidden types
42
+ --> $DIR/issue-119493-type-error-ice.rs:3:4
43
+ |
44
+ LL | fn foo() {
45
+ | ^^^
46
+
47
+ error[E0308]: mismatched types
48
+ --> $DIR/issue-119493-type-error-ice.rs:13:9
49
+ |
50
+ LL | type U = impl Copy;
51
+ | --------- the expected opaque type
52
+ ...
53
+ LL | let Foo(()) = foo;
54
+ | ^^^^^^^ --- this expression has type `U`
55
+ | |
56
+ | expected opaque type, found `Foo`
57
+ |
58
+ = note: expected opaque type `U`
59
+ found struct `Foo`
60
+ note: this item must have the opaque type in its signature in order to be able to register hidden types
61
+ --> $DIR/issue-119493-type-error-ice.rs:3:4
62
+ |
63
+ LL | fn foo() {
64
+ | ^^^
65
+
66
+ error: aborting due to 5 previous errors
29
67
30
- Some errors have detailed explanations: E0412, E0658.
31
- For more information about an error, try `rustc --explain E0412 `.
68
+ Some errors have detailed explanations: E0308, E0412, E0658.
69
+ For more information about an error, try `rustc --explain E0308 `.
0 commit comments