-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-borrow-checkerArea: The borrow checkerArea: The borrow checkerA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
On an change I was implementing in the compiler I got the following error ...
error[E0521]: borrowed data escapes outside of function
--> src/librustc_codegen_ssa/mir/analyze.rs:228:9
|
218 | fn visit_place(&mut self,
| --------- `self` is declared here, outside of the function body
219 | place: &mir::Place<'tcx>,
| ----- `place` is a reference that is only valid in the function body
...
228 | self.process_place(place_ref, context, location);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `place` escapes the function body here
error: aborting due to previous error
I don't remember how the code looked like exactly but we can probably rebuild an example that shows this behavior.
Metadata
Metadata
Assignees
Labels
A-borrow-checkerArea: The borrow checkerArea: The borrow checkerA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.