mir is already a reference
This commit is contained in:
parent
c85c5a0423
commit
4b12ded889
@ -40,7 +40,7 @@ pub(in borrow_check) fn explain_why_borrow_contains_point(
|
||||
if let Some(cause) = cause_info.why_region_contains_point(borrow.region, context.loc) {
|
||||
match *cause.root_cause() {
|
||||
Cause::LiveVar(local, location) => {
|
||||
match find_regular_use(&mir, regioncx, borrow, location, local) {
|
||||
match find_regular_use(mir, regioncx, borrow, location, local) {
|
||||
Some(p) => {
|
||||
err.span_label(
|
||||
mir.source_info(p).span,
|
||||
@ -58,9 +58,9 @@ pub(in borrow_check) fn explain_why_borrow_contains_point(
|
||||
}
|
||||
|
||||
Cause::DropVar(local, location) => {
|
||||
match find_drop_use(&mir, regioncx, borrow, location, local) {
|
||||
match find_drop_use(mir, regioncx, borrow, location, local) {
|
||||
Some(p) => {
|
||||
let local_name = &mir.local_decls[local].name.unwrap();
|
||||
let local_name = mir.local_decls[local].name.unwrap();
|
||||
|
||||
err.span_label(
|
||||
mir.source_info(p).span,
|
||||
|
Loading…
Reference in New Issue
Block a user