Closed
Description
Right now, the MIR has a special field, return_ty
:
Lines 85 to 86 in f93a492
However, the MIR also has an array of locals, and the 0th local is the "return slot". Its type is the return type:
Lines 97 to 102 in f93a492
It would be nice to eliminate the redundancy. My preference would be to remove the return_ty
field, perhaps adding an accessor to Mir<'tcx>
like:
fn return_ty(&self) -> Ty<'tcx> {
self.local_vars[RETURN_POINTER].ty
}
Metadata
Metadata
Assignees
Labels
Category: PRs that clean code up or issues documenting cleanup.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.