@@ -386,10 +386,11 @@ impl<'tcx> LoanPath<'tcx> {
386
386
( & LpExtend ( ref base, a, LpInterior ( id) ) ,
387
387
& LpExtend ( ref base2, _, LpInterior ( id2) ) ) => {
388
388
if id == id2 {
389
- assert ! ( self . ty == other. ty) ;
390
389
base. common ( & * * base2) . map ( |x| {
391
390
let xd = x. depth ( ) ;
392
391
if base. depth ( ) == xd && base2. depth ( ) == xd {
392
+ assert_eq ! ( base. ty, base2. ty) ;
393
+ assert_eq ! ( self . ty, other. ty) ;
393
394
LoanPath {
394
395
kind : LpExtend ( Rc :: new ( x) , a, LpInterior ( id) ) ,
395
396
ty : self . ty ,
@@ -406,15 +407,15 @@ impl<'tcx> LoanPath<'tcx> {
406
407
( _, & LpExtend ( ref other, _, LpDeref ( _) ) ) => self . common ( & * * other) ,
407
408
( & LpVar ( id) , & LpVar ( id2) ) => {
408
409
if id == id2 {
409
- assert ! ( self . ty == other. ty) ;
410
+ assert_eq ! ( self . ty, other. ty) ;
410
411
Some ( LoanPath { kind : LpVar ( id) , ty : self . ty } )
411
412
} else {
412
413
None
413
414
}
414
415
}
415
416
( & LpUpvar ( id) , & LpUpvar ( id2) ) => {
416
417
if id == id2 {
417
- assert ! ( self . ty == other. ty) ;
418
+ assert_eq ! ( self . ty, other. ty) ;
418
419
Some ( LoanPath { kind : LpUpvar ( id) , ty : self . ty } )
419
420
} else {
420
421
None
0 commit comments