diff options
Diffstat (limited to 'tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.stderr')
-rw-r--r-- | tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.stderr | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.stderr b/tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.stderr new file mode 100644 index 000000000..00aedfae4 --- /dev/null +++ b/tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.stderr @@ -0,0 +1,20 @@ +error[E0308]: mismatched types + --> $DIR/hidden_behind_projection_behind_struct_field.rs:19:22 + | +LL | type Assoc = impl std::fmt::Debug; + | -------------------- the expected opaque type +LL | fn foo() -> Foo<Bar> { +LL | Foo { field: () } + | ^^ expected opaque type, found `()` + | + = note: expected opaque type `<Bar as Trait>::Assoc` + 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_projection_behind_struct_field.rs:18:8 + | +LL | fn foo() -> Foo<Bar> { + | ^^^ + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0308`. |