use slice::contains
where applicable
This commit is contained in:
parent
e77a8f439c
commit
9ef35ddc0c
7 changed files with 16 additions and 15 deletions
|
@ -1496,7 +1496,7 @@ fn build_scope_drops<'tcx>(
|
|||
// path, then don't generate the drop. (We only take this into
|
||||
// account for non-unwind paths so as not to disturb the
|
||||
// caching mechanism.)
|
||||
if scope.moved_locals.iter().any(|&o| o == local) {
|
||||
if scope.moved_locals.contains(&local) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue