error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:10:5
   |
LL |     binary_heap = binary_heap.into_iter().filter(|x| x % 2 == 0).collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `binary_heap.retain(|x| x % 2 == 0)`
   |
   = note: `-D clippy::manual-retain` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::manual_retain)]`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:12:5
   |
LL |     binary_heap = binary_heap.iter().filter(|&x| x % 2 == 0).copied().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `binary_heap.retain(|x| x % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:14:5
   |
LL |     binary_heap = binary_heap.iter().filter(|&x| x % 2 == 0).cloned().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `binary_heap.retain(|x| x % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:19:5
   |
LL |     tuples = tuples.iter().filter(|&&(ref x, ref y)| *x == 0).copied().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|&(ref x, ref y)| *x == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:21:5
   |
LL |     tuples = tuples.iter().filter(|(x, y)| *x == 0).copied().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|(x, y)| *x == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:52:5
   |
LL |     btree_map = btree_map.into_iter().filter(|(k, _)| k % 2 == 0).collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `btree_map.retain(|k, _| k % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:54:5
   |
LL |     btree_map = btree_map.into_iter().filter(|(_, v)| v % 2 == 0).collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `btree_map.retain(|_, &mut v| v % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:56:5
   |
LL | /     btree_map = btree_map
LL | |
LL | |         .into_iter()
LL | |         .filter(|(k, v)| (k % 2 == 0) && (v % 2 == 0))
LL | |         .collect();
   | |__________________^ help: consider calling `.retain()` instead: `btree_map.retain(|k, &mut v| (k % 2 == 0) && (v % 2 == 0))`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:82:5
   |
LL |     btree_set = btree_set.iter().filter(|&x| x % 2 == 0).copied().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `btree_set.retain(|x| x % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:84:5
   |
LL |     btree_set = btree_set.iter().filter(|&x| x % 2 == 0).cloned().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `btree_set.retain(|x| x % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:86:5
   |
LL |     btree_set = btree_set.into_iter().filter(|x| x % 2 == 0).collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `btree_set.retain(|x| x % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:91:5
   |
LL |     tuples = tuples.iter().filter(|&&(ref x, ref y)| *x == 0).copied().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|&(ref x, ref y)| *x == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:93:5
   |
LL |     tuples = tuples.iter().filter(|(x, y)| *x == 0).copied().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|(x, y)| *x == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:124:5
   |
LL |     hash_map = hash_map.into_iter().filter(|(k, _)| k % 2 == 0).collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `hash_map.retain(|k, _| k % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:126:5
   |
LL |     hash_map = hash_map.into_iter().filter(|(_, v)| v % 2 == 0).collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `hash_map.retain(|_, &mut v| v % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:128:5
   |
LL | /     hash_map = hash_map
LL | |
LL | |         .into_iter()
LL | |         .filter(|(k, v)| (k % 2 == 0) && (v % 2 == 0))
LL | |         .collect();
   | |__________________^ help: consider calling `.retain()` instead: `hash_map.retain(|k, &mut v| (k % 2 == 0) && (v % 2 == 0))`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:153:5
   |
LL |     hash_set = hash_set.into_iter().filter(|x| x % 2 == 0).collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `hash_set.retain(|x| x % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:155:5
   |
LL |     hash_set = hash_set.iter().filter(|&x| x % 2 == 0).copied().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `hash_set.retain(|x| x % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:157:5
   |
LL |     hash_set = hash_set.iter().filter(|&x| x % 2 == 0).cloned().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `hash_set.retain(|x| x % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:162:5
   |
LL |     tuples = tuples.iter().filter(|&&(ref x, ref y)| *x == 0).copied().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|&(ref x, ref y)| *x == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:164:5
   |
LL |     tuples = tuples.iter().filter(|(x, y)| *x == 0).copied().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|(x, y)| *x == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:194:5
   |
LL |     s = s.chars().filter(|&c| c != 'o').to_owned().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `s.retain(|c| c != 'o')`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:207:5
   |
LL |     vec = vec.iter().filter(|&x| x % 2 == 0).copied().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| x % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:209:5
   |
LL |     vec = vec.iter().filter(|&x| x % 2 == 0).cloned().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| x % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:211:5
   |
LL |     vec = vec.into_iter().filter(|x| x % 2 == 0).collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| x % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:216:5
   |
LL |     tuples = tuples.iter().filter(|&&(ref x, ref y)| *x == 0).copied().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|&(ref x, ref y)| *x == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:218:5
   |
LL |     tuples = tuples.iter().filter(|(x, y)| *x == 0).copied().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|(x, y)| *x == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:241:5
   |
LL |     vec_deque = vec_deque.iter().filter(|&x| x % 2 == 0).copied().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec_deque.retain(|x| x % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:243:5
   |
LL |     vec_deque = vec_deque.iter().filter(|&x| x % 2 == 0).cloned().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec_deque.retain(|x| x % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:245:5
   |
LL |     vec_deque = vec_deque.into_iter().filter(|x| x % 2 == 0).collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec_deque.retain(|x| x % 2 == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:303:5
   |
LL |     vec = vec.into_iter().filter(|(x, y)| *x == 0).collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|(x, y)| *x == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:308:5
   |
LL |     tuples = tuples.into_iter().filter(|(_, n)| *n > 0).collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|(_, n)| *n > 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:326:5
   |
LL |     vec = vec.iter().filter(|&&x| x == 0).copied().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|&x| x == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:328:5
   |
LL |     vec = vec.iter().filter(|&&x| x == 0).cloned().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|&x| x == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:330:5
   |
LL |     vec = vec.into_iter().filter(|&x| x == 0).collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|&x| x == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:334:5
   |
LL |     vec = vec.iter().filter(|&x| *x == 0).copied().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| *x == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:336:5
   |
LL |     vec = vec.iter().filter(|&x| *x == 0).cloned().collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| *x == 0)`

error: this expression can be written more simply using `.retain()`
  --> tests/ui/manual_retain.rs:338:5
   |
LL |     vec = vec.into_iter().filter(|x| *x == 0).collect();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| *x == 0)`

error: aborting due to 38 previous errors

