mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
11 lines
287 B
Rust
11 lines
287 B
Rust
#![feature(tool_lints)]
|
|
#![warn(clippy::all, clippy::style, clippy::mem_replace_option_with_none)]
|
|
|
|
use std::mem;
|
|
|
|
fn main() {
|
|
let mut an_option = Some(1);
|
|
let _ = mem::replace(&mut an_option, None);
|
|
let an_option = &mut Some(1);
|
|
let _ = mem::replace(an_option, None);
|
|
}
|