Skip to content

Commit 2adf2cd

Browse files
committed
Account for debuginfo on _0 without naming it.
1 parent e7b998c commit 2adf2cd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

compiler/rustc_codegen_ssa/src/mir/debuginfo.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
241241
pub fn debug_introduce_local(&self, bx: &mut Bx, local: mir::Local) {
242242
let full_debug_info = bx.sess().opts.debuginfo == DebugInfo::Full;
243243

244-
// FIXME(eddyb) maybe name the return place as `_0` or `return`?
245-
if local == mir::RETURN_PLACE {
246-
return;
247-
}
248-
249244
let vars = match &self.per_local_var_debug_info {
250245
Some(per_local) => &per_local[local],
251246
None => return,
@@ -302,7 +297,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
302297

303298
let local_ref = &self.locals[local];
304299

305-
let name = if bx.sess().fewer_names() {
300+
// FIXME Should the return place be named?
301+
let name = if bx.sess().fewer_names() || local == mir::RETURN_PLACE {
306302
None
307303
} else {
308304
Some(match whole_local_var.or(fallback_var.clone()) {

0 commit comments

Comments
 (0)