File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
compiler/rustc_driver/src Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -324,16 +324,12 @@ impl<'tcx> pprust_hir::PpAnn for TypedAnnotation<'tcx> {
324324 }
325325 fn post ( & self , s : & mut pprust_hir:: State < ' _ > , node : pprust_hir:: AnnNode < ' _ > ) {
326326 if let pprust_hir:: AnnNode :: Expr ( expr) = node {
327- let typeck_results =
328- self . maybe_typeck_results . get ( ) . or_else ( || {
329- if let Some ( body_id) = self . tcx . hir ( ) . maybe_body_owned_by (
330- self . tcx . hir ( ) . local_def_id_to_hir_id ( expr. hir_id . owner ) ,
331- ) {
332- Some ( self . tcx . typeck_body ( body_id) )
333- } else {
334- None
335- }
336- } ) ;
327+ let typeck_results = self . maybe_typeck_results . get ( ) . or_else ( || {
328+ self . tcx
329+ . hir ( )
330+ . maybe_body_owned_by ( self . tcx . hir ( ) . local_def_id_to_hir_id ( expr. hir_id . owner ) )
331+ . map ( |body_id| self . tcx . typeck_body ( body_id) )
332+ } ) ;
337333
338334 if let Some ( typeck_results) = typeck_results {
339335 s. s . space ( ) ;
You can’t perform that action at this time.
0 commit comments