rust/tests/ui/type-alias-impl-trait/hidden_type_mismatch.stderr
Oli Scherer 40d5609548 Make DefiningAnchor::Bind only store the opaque types that may be constrained, instead of the current infcx root item.
This makes `Bind` almost always be empty, so we can start forwarding it to queries, allowing us to remove `Bubble` entirely
2024-03-11 17:19:37 +00:00

28 lines
1 KiB
Plaintext

error[E0271]: type mismatch resolving `<() as Proj>::Assoc == i32`
--> $DIR/hidden_type_mismatch.rs:43:9
|
LL | pub type Sep = impl Sized + std::fmt::Display;
| ------------------------------ the expected opaque type
...
LL | Bar { inner: 1i32, _marker: () }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch resolving `<() as Proj>::Assoc == i32`
|
note: expected this to be `Sep`
--> $DIR/hidden_type_mismatch.rs:20:22
|
LL | type Assoc = sus::Sep;
| ^^^^^^^^
= note: expected opaque type `Sep`
found type `i32`
note: required for `Bar<()>` to implement `Copy`
--> $DIR/hidden_type_mismatch.rs:32:39
|
LL | impl<T: Proj<Assoc = i32> + Copy> Copy for Bar<T> {}
| ----------- ^^^^ ^^^^^^
| |
| unsatisfied trait bound introduced here
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.