In Impl Trait for T with associated type that = T, bounds do not recognize that T impls Trait #92505
Open
Description
This compiles and runs: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=0b6a35cad2587fe5d1d4cdb30e94aa47
However this doesn't: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=4e6a1dc742260b4754b540349099fcb3
The first bound seems to be "forgotten" when the second bound is added. A few folks on the rust discord suggested this may be a bug. It appears to be the case in both nightly and stable.
It appears to be the case even without const generics: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=1a12aaeb3addf903f722337a576747b3
Stable version: 1.57.0
Nightly version: 1.59.0-nightly (2022-01-01 c145692)