Avoid some Place clones.
This is a 0.5% speedup on ripgrep.
This commit is contained in:
parent
3ac79c7184
commit
c0636ab087
1 changed files with 4 additions and 1 deletions
|
@ -1080,7 +1080,10 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if self
|
// Check is_empty() first because it's the common case, and doing that
|
||||||
|
// way we avoid the clone() call.
|
||||||
|
if !self.access_place_error_reported.is_empty() &&
|
||||||
|
self
|
||||||
.access_place_error_reported
|
.access_place_error_reported
|
||||||
.contains(&(place_span.0.clone(), place_span.1))
|
.contains(&(place_span.0.clone(), place_span.1))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue