mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
17 lines
603 B
Plaintext
17 lines
603 B
Plaintext
error: replacing an `Option` with `None`
|
|
--> $DIR/mem_replace.rs:16:13
|
|
|
|
|
16 | 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`
|
|
|
|
error: replacing an `Option` with `None`
|
|
--> $DIR/mem_replace.rs:18:13
|
|
|
|
|
18 | let _ = mem::replace(an_option, None);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `an_option.take()`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|