1
Fork 0

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.
This commit is contained in:
Matthias Krüger 2023-07-09 16:33:35 +02:00 committed by GitHub
commit 4406a92cd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 191 additions and 195 deletions

View file

@ -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()) {