File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1499,12 +1499,12 @@ impl<'tcx> TyCtxt<'tcx> {
1499
1499
}
1500
1500
1501
1501
pub fn return_type_impl_trait ( self , scope_def_id : LocalDefId ) -> Option < ( Ty < ' tcx > , Span ) > {
1502
- // HACK: `type_of_def_id ()` will fail on these (#55796), so return `None`.
1502
+ // HACK: `type_of ()` will fail on these (#55796), so return `None`.
1503
1503
let hir_id = self . hir ( ) . local_def_id_to_hir_id ( scope_def_id) ;
1504
1504
match self . hir ( ) . get ( hir_id) {
1505
1505
Node :: Item ( item) => {
1506
1506
match item. kind {
1507
- ItemKind :: Fn ( ..) => { /* `type_of_def_id ()` will work */ }
1507
+ ItemKind :: Fn ( ..) => { /* `type_of ()` will work */ }
1508
1508
_ => {
1509
1509
return None ;
1510
1510
}
@@ -1516,7 +1516,7 @@ impl<'tcx> TyCtxt<'tcx> {
1516
1516
return None ;
1517
1517
}
1518
1518
}
1519
- _ => { /* `type_of_def_id ()` will work or panic */ }
1519
+ _ => { /* `type_of ()` will work or panic */ }
1520
1520
}
1521
1521
1522
1522
let ret_ty = self . type_of ( scope_def_id) ;
Original file line number Diff line number Diff line change @@ -492,7 +492,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> {
492
492
493
493
x => tcx. ty_error_with_message (
494
494
DUMMY_SP ,
495
- & format ! ( "unexpected const parent in type_of_def_id (): {:?}" , x) ,
495
+ & format ! ( "unexpected const parent in type_of (): {:?}" , x) ,
496
496
) ,
497
497
}
498
498
}
@@ -504,7 +504,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> {
504
504
} ,
505
505
506
506
x => {
507
- bug ! ( "unexpected sort of node in type_of_def_id (): {:?}" , x) ;
507
+ bug ! ( "unexpected sort of node in type_of (): {:?}" , x) ;
508
508
}
509
509
}
510
510
}
You can’t perform that action at this time.
0 commit comments