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