]> git.lizzy.rs Git - rust.git/blob - tests/ui/mem_replace.stderr
mem_replace: match on path.
[rust.git] / tests / ui / mem_replace.stderr
1 error: replacing an `Option` with `None`
2  --> $DIR/mem_replace.rs:8:13
3   |
4 8 |     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:10:13
11    |
12 10 |     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