Subst gat normalize pred correctly
This commit is contained in:
parent
6dc3999c26
commit
08284449a2
2 changed files with 18 additions and 1 deletions
|
@ -1958,7 +1958,7 @@ pub(super) fn check_type_bounds<'tcx>(
|
||||||
let container_id = impl_ty.container_id(tcx);
|
let container_id = impl_ty.container_id(tcx);
|
||||||
|
|
||||||
let rebased_substs = impl_ty_substs.rebase_onto(tcx, container_id, impl_trait_ref.substs);
|
let rebased_substs = impl_ty_substs.rebase_onto(tcx, container_id, impl_trait_ref.substs);
|
||||||
let impl_ty_value = tcx.type_of(impl_ty.def_id).subst_identity();
|
let impl_ty_value = tcx.type_of(impl_ty.def_id).subst(tcx, impl_ty_substs);
|
||||||
|
|
||||||
let param_env = tcx.param_env(impl_ty.def_id);
|
let param_env = tcx.param_env(impl_ty.def_id);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
// check-pass
|
||||||
|
|
||||||
|
trait Foo {
|
||||||
|
type Assoc<T>: PartialEq<Self::Assoc<i32>>;
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Foo for () {
|
||||||
|
type Assoc<T> = Wrapper<T>;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct Wrapper<T>(T);
|
||||||
|
|
||||||
|
impl<T> PartialEq<Wrapper<i32>> for Wrapper<T> {
|
||||||
|
fn eq(&self, _other: &Wrapper<i32>) -> bool { true }
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {}
|
Loading…
Add table
Add a link
Reference in a new issue