about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-07-09 16:33:35 +0200
committerGitHub <noreply@github.com>2023-07-09 16:33:35 +0200
commit4406a92cd19db9d5d3d4c65d11a855bed8816503 (patch)
treedeaf2ffa77890bfff0a9a01e5221d5cbccc96660 /compiler
parentba37a69d30fc6ffc0c2589eb59e936c261b36e76 (diff)
parentd7983a2f231a279984fc70eb428b936930eaa45c (diff)
downloadrust-4406a92cd19db9d5d3d4c65d11a855bed8816503.tar.gz
rust-4406a92cd19db9d5d3d4c65d11a855bed8816503.zip
Rollup merge of #111618 - cjgillot:name-return-place, r=tmiasko
Always name the return place.

MIR opts more and more consider `_0` as just another local, so there is no point in keeping the special case in debug-info logic.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/debuginfo.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs b/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs
index 1ee89b3d5e8..4b27b64962d 100644
--- a/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs
@@ -328,8 +328,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
 
         let local_ref = &self.locals[local];
 
-        // FIXME Should the return place be named?
-        let name = if bx.sess().fewer_names() || local == mir::RETURN_PLACE {
+        let name = if bx.sess().fewer_names() {
             None
         } else {
             Some(match whole_local_var.or(fallback_var.clone()) {