Avoid cloning Place in visit_rvalue
This commit is contained in:
parent
7789cbf700
commit
b59ded8ae0
1 changed files with 4 additions and 4 deletions
|
|
@ -1199,10 +1199,10 @@ impl<'a, 'tcx> Visitor<'tcx> for Checker<'a, 'tcx> {
|
|||
MutatingUseContext::Borrow,
|
||||
),
|
||||
};
|
||||
self.visit_place(&Place {
|
||||
base: place.base.clone(),
|
||||
projection: proj.clone(),
|
||||
}, ctx, location);
|
||||
self.visit_place_base(&place.base, ctx, location);
|
||||
if let Some(proj) = proj {
|
||||
self.visit_projection(&place.base, proj, ctx, location);
|
||||
}
|
||||
} else {
|
||||
self.super_rvalue(rvalue, location);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue