mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 23:20:39 +00:00
12 lines
236 B
Rust
12 lines
236 B
Rust
|
#![feature(plugin)]
|
||
|
#![plugin(clippy)]
|
||
|
|
||
|
#[deny(option_unwrap_used, result_unwrap_used)]
|
||
|
fn main() {
|
||
|
let opt = Some(0);
|
||
|
let _ = opt.unwrap(); //~ERROR
|
||
|
|
||
|
let res: Result<i32, ()> = Ok(0);
|
||
|
let _ = res.unwrap(); //~ERROR
|
||
|
}
|