rust-clippy/tests/ui/ref_option_ref.rs

10 lines
183 B
Rust
Raw Normal View History

#![allow(unused)]
2020-10-12 21:58:59 +00:00
#![warn(clippy::ref_option_ref)]
type OptRefU32<'a> = &'a Option<&'a u32>;
type OptRef<'a, T> = &'a Option<&'a T>;
2020-10-12 21:58:59 +00:00
fn main() {
let x: &Option<&u32> = &None;
}