diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-07-09 16:33:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-09 16:33:35 +0200 |
| commit | 4406a92cd19db9d5d3d4c65d11a855bed8816503 (patch) | |
| tree | deaf2ffa77890bfff0a9a01e5221d5cbccc96660 /compiler | |
| parent | ba37a69d30fc6ffc0c2589eb59e936c261b36e76 (diff) | |
| parent | d7983a2f231a279984fc70eb428b936930eaa45c (diff) | |
| download | rust-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.rs | 3 |
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()) { |
