1 fn input(_: Option<Option<u8>>) {}
3 fn output() -> Option<Option<u8>> {
7 fn output_nested() -> Vec<Option<Option<u8>>> {
11 // The lint only generates one warning for this
12 fn output_nested_nested() -> Option<Option<Option<u8>>> {
17 x: Option<Option<u8>>,
21 fn struct_fn() -> Option<Option<u8>> {
27 fn trait_fn() -> Option<Option<u8>>;
31 Tuple(Option<Option<u8>>),
32 Struct { x: Option<Option<u8>> },
35 // The lint allows this
36 type OptionOption = Option<Option<u32>>;
38 // The lint allows this
39 fn output_type_alias() -> OptionOption {
43 // The line allows this
44 impl Trait for Struct {
45 fn trait_fn() -> Option<Option<u8>> {
55 // The lint allows this
56 let local: Option<Option<u8>> = None;
58 // The lint allows this
59 let expr = Some(Some(true));