error: this expression can be written more simply using `.retain()`
  --> $DIR/use_retain.rs:45: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)`
   |
   = note: `-D clippy::use-retain` implied by `-D warnings`

error: this expression can be written more simply using `.retain()`
  --> $DIR/use_retain.rs:46: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()`
  --> $DIR/use_retain.rs:47:5
   |
LL | /     btree_map = btree_map
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()`
  --> $DIR/use_retain.rs:69: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()`
  --> $DIR/use_retain.rs:70: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()`
  --> $DIR/use_retain.rs:93: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()`
  --> $DIR/use_retain.rs:94: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()`
  --> $DIR/use_retain.rs:95:5
   |
LL | /     hash_map = hash_map
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()`
  --> $DIR/use_retain.rs:116: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()`
  --> $DIR/use_retain.rs:117: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()`
  --> $DIR/use_retain.rs:139: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()`
  --> $DIR/use_retain.rs:151: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()`
  --> $DIR/use_retain.rs:152: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()`
  --> $DIR/use_retain.rs:172: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()`
  --> $DIR/use_retain.rs:173: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: aborting due to 15 previous errors