Skip to content

Commit f578229

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 73c9854 commit f578229

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_mir/util/pretty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ pub fn write_mir_intro<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
346346
let indented_retptr = format!("{}let mut {:?}: {};",
347347
INDENT,
348348
RETURN_POINTER,
349-
mir.return_ty);
349+
mir.local_decls[RETURN_POINTER].ty);
350350
writeln!(w, "{0:1$} // return pointer",
351351
indented_retptr,
352352
ALIGN)?;

0 commit comments

Comments
 (0)