]> git.lizzy.rs Git - rust.git/blob - tests/ui/mem_replace.stderr
Auto merge of #3653 - gendx:master, r=phansch
[rust.git] / tests / ui / mem_replace.stderr
1 error: replacing an `Option` with `None`
2   --> $DIR/mem_replace.rs:18:13
3    |
4 LL |     let _ = mem::replace(&mut an_option, None);
5    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `an_option.take()`
6    |
7    = note: `-D clippy::mem-replace-option-with-none` implied by `-D warnings`
8
9 error: replacing an `Option` with `None`
10   --> $DIR/mem_replace.rs:20:13
11    |
12 LL |     let _ = mem::replace(an_option, None);
13    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `an_option.take()`
14
15 error: aborting due to 2 previous errors
16