Skip to content

Commit 5fdab90

Browse files
committed
MIR-dump: print return type from local_decls for _0
We've kind of got the same information twice in the MIR, between the return-type field and the local-decls. Seems un-great.
1 parent fae7da3 commit 5fdab90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_mir/util/pretty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ pub fn write_mir_intro<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
348348
let indented_retptr = format!("{}let mut {:?}: {};",
349349
INDENT,
350350
RETURN_POINTER,
351-
mir.return_ty);
351+
mir.local_decls[RETURN_POINTER].ty);
352352
writeln!(w, "{0:1$} // return pointer",
353353
indented_retptr,
354354
ALIGN)?;

0 commit comments

Comments
 (0)