| error[E0308]: mismatched types |
| --> $DIR/itiat-forbid-nested-items.rs:12:41 |
| | |
| LL | type Assoc = impl Sized; |
| | ---------- the expected opaque type |
| ... |
| LL | let x: <() as Foo>::Assoc = 42_i32; |
| | ------------------ ^^^^^^ expected opaque type, found `i32` |
| | | |
| | expected due to this |
| | |
| = note: expected opaque type `<() as Foo>::Assoc` |
| found type `i32` |
| note: this item must have the opaque type in its signature in order to be able to register hidden types |
| --> $DIR/itiat-forbid-nested-items.rs:11:12 |
| | |
| LL | fn foo() -> <() as Foo>::Assoc { |
| | ^^^ |
| |
| error: aborting due to 1 previous error |
| |
| For more information about this error, try `rustc --explain E0308`. |