Open
Description
I tried this code:
trait Trait {
type Gat<T>;
}
trait Subtrait: Trait<Gat<u32> = u32, Gat<u64> = u64> {}
I expected to see this happen: It compiles
Instead, this happened:
error[E0719]: the value of the associated type `Gat` in trait `Trait` is already specified
--> src/lib.rs:5:39
|
5 | trait Subtrait: Trait<Gat<u32> = u32, Gat<u64> = u64> {}
| -------------- ^^^^^^^^^^^^^^ re-bound here
| |
| `Gat` bound here first
For more information about this error, try `rustc --explain E0719`.
(Perhaps E0719 should be removed entirely, and turned into a lint?)
Meta
rustc --version
:
1.88.0
Originally reported on Internals: https://internals.rust-lang.org/t/multiple-gat-constraints-with-different-generics-on-trait-bounds/23148
@rustbot label T-types A-associated-items A-GATs