File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 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> {
14991499 }
15001500
15011501 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`.
15031503 let hir_id = self . hir ( ) . local_def_id_to_hir_id ( scope_def_id) ;
15041504 match self . hir ( ) . get ( hir_id) {
15051505 Node :: Item ( item) => {
15061506 match item. kind {
1507- ItemKind :: Fn ( ..) => { /* `type_of_def_id ()` will work */ }
1507+ ItemKind :: Fn ( ..) => { /* `type_of ()` will work */ }
15081508 _ => {
15091509 return None ;
15101510 }
@@ -1516,7 +1516,7 @@ impl<'tcx> TyCtxt<'tcx> {
15161516 return None ;
15171517 }
15181518 }
1519- _ => { /* `type_of_def_id ()` will work or panic */ }
1519+ _ => { /* `type_of ()` will work or panic */ }
15201520 }
15211521
15221522 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<'_> {
492492
493493 x => tcx. ty_error_with_message (
494494 DUMMY_SP ,
495- & format ! ( "unexpected const parent in type_of_def_id (): {:?}" , x) ,
495+ & format ! ( "unexpected const parent in type_of (): {:?}" , x) ,
496496 ) ,
497497 }
498498 }
@@ -504,7 +504,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> {
504504 } ,
505505
506506 x => {
507- bug ! ( "unexpected sort of node in type_of_def_id (): {:?}" , x) ;
507+ bug ! ( "unexpected sort of node in type_of (): {:?}" , x) ;
508508 }
509509 }
510510}
You can’t perform that action at this time.
0 commit comments