1
Fork 0

Do not create param types that differ only by name when comparing intrinsic signatures

This commit is contained in:
Michael Goulet 2024-02-03 18:52:30 +00:00
parent 1d74589fac
commit 623bd5843b
2 changed files with 22 additions and 5 deletions

View file

@ -438,7 +438,7 @@ pub fn structurally_relate_tys<'tcx, R: TypeRelation<'tcx>>(
(ty::Param(a_p), ty::Param(b_p)) if a_p.index == b_p.index => {
debug_assert_eq!(a_p.name, b_p.name, "param types with same index differ in name");
Ok(a)
},
}
(ty::Placeholder(p1), ty::Placeholder(p2)) if p1 == p2 => Ok(a),