1
Fork 0

use slice::contains where applicable

This commit is contained in:
Yotam Ofek 2025-03-28 12:21:21 +00:00
parent e77a8f439c
commit 9ef35ddc0c
7 changed files with 16 additions and 15 deletions

View file

@ -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;
}