mirror of https://github.com/rust-lang/rust
21 lines
734 B
Plaintext
21 lines
734 B
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/hidden_behind_struct_field3.rs:19:27
|
|
|
|
|
LL | type Assoc2 = impl std::fmt::Debug;
|
|
| -------------------- the expected opaque type
|
|
...
|
|
LL | vec![Foo { field: () }].into_iter()
|
|
| ^^ expected opaque type, found `()`
|
|
|
|
|
= note: expected opaque type `<Bar as Trait>::Assoc2`
|
|
found unit type `()`
|
|
note: this item must have the opaque type in its signature in order to be able to register hidden types
|
|
--> $DIR/hidden_behind_struct_field3.rs:18:8
|
|
|
|
|
LL | fn foo() -> Self::Assoc {
|
|
| ^^^
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|