File tree 1 file changed +21
-3
lines changed
1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -1404,15 +1404,27 @@ pub fn checked_type_of<'a, 'tcx>(
1404
1404
if !fail {
1405
1405
return None ;
1406
1406
}
1407
- bug ! ( "unexpected const parent path def {:?}" , x) ;
1407
+ tcx. sess . delay_span_bug (
1408
+ DUMMY_SP ,
1409
+ & format ! (
1410
+ "unexpected const parent path def {:?}" , x
1411
+ ) ,
1412
+ ) ;
1413
+ tcx. types . err
1408
1414
}
1409
1415
}
1410
1416
}
1411
1417
x => {
1412
1418
if !fail {
1413
1419
return None ;
1414
1420
}
1415
- bug ! ( "unexpected const parent path {:?}" , x) ;
1421
+ tcx. sess . delay_span_bug (
1422
+ DUMMY_SP ,
1423
+ & format ! (
1424
+ "unexpected const parent path {:?}" , x
1425
+ ) ,
1426
+ ) ;
1427
+ tcx. types . err
1416
1428
}
1417
1429
}
1418
1430
}
@@ -1421,7 +1433,13 @@ pub fn checked_type_of<'a, 'tcx>(
1421
1433
if !fail {
1422
1434
return None ;
1423
1435
}
1424
- bug ! ( "unexpected const parent in type_of_def_id(): {:?}" , x) ;
1436
+ tcx. sess . delay_span_bug (
1437
+ DUMMY_SP ,
1438
+ & format ! (
1439
+ "unexpected const parent in type_of_def_id(): {:?}" , x
1440
+ ) ,
1441
+ ) ;
1442
+ tcx. types . err
1425
1443
}
1426
1444
}
1427
1445
}
You can’t perform that action at this time.
0 commit comments