We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf3c6c5 commit 9ca645aCopy full SHA for 9ca645a
compiler/rustc_middle/src/ty/relate.rs
@@ -435,7 +435,10 @@ pub fn structurally_relate_tys<'tcx, R: TypeRelation<'tcx>>(
435
Ok(a)
436
}
437
438
- (ty::Param(a_p), ty::Param(b_p)) if a_p.index == b_p.index => Ok(a),
+ (ty::Param(a_p), ty::Param(b_p)) if a_p.index == b_p.index => {
439
+ debug_assert_eq!(a_p.name, b_p.name, "param types with same index differ in name");
440
+ Ok(a)
441
+ },
442
443
(ty::Placeholder(p1), ty::Placeholder(p2)) if p1 == p2 => Ok(a),
444
0 commit comments