File tree 1 file changed +6
-10
lines changed
compiler/rustc_driver/src
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> {
324
324
}
325
325
fn post ( & self , s : & mut pprust_hir:: State < ' _ > , node : pprust_hir:: AnnNode < ' _ > ) {
326
326
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
+ } ) ;
337
333
338
334
if let Some ( typeck_results) = typeck_results {
339
335
s. s . space ( ) ;
You can’t perform that action at this time.
0 commit comments