rust/tests/ui/mem_replace.stderr

17 lines
603 B
Plaintext
Raw Normal View History

error: replacing an `Option` with `None`
2018-10-06 11:18:06 -05:00
--> $DIR/mem_replace.rs:18:13
|
18 | let _ = mem::replace(&mut an_option, None);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `an_option.take()`
|
= note: `-D clippy::mem-replace-option-with-none` implied by `-D warnings`
2018-09-18 18:54:01 -05:00
error: replacing an `Option` with `None`
2018-10-06 11:18:06 -05:00
--> $DIR/mem_replace.rs:20:13
2018-09-18 18:54:01 -05:00
|
2018-10-06 11:18:06 -05:00
20 | let _ = mem::replace(an_option, None);
2018-09-18 18:54:01 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `an_option.take()`
error: aborting due to 2 previous errors