1 fn input(_: Option<Option<u8>>) {
4 fn output() -> Option<Option<u8>> {
8 fn output_nested() -> Vec<Option<Option<u8>>> {
12 // The lint only generates one warning for this
13 fn output_nested_nested() -> Option<Option<Option<u8>>> {
18 x: Option<Option<u8>>,
22 fn struct_fn() -> Option<Option<u8>> {
28 fn trait_fn() -> Option<Option<u8>>;
32 Tuple(Option<Option<u8>>),
33 Struct{x: Option<Option<u8>>},
36 // The lint allows this
37 type OptionOption = Option<Option<u32>>;
39 // The lint allows this
40 fn output_type_alias() -> OptionOption {
44 // The line allows this
45 impl Trait for Struct {
46 fn trait_fn() -> Option<Option<u8>> {
56 // The lint allows this
57 let local: Option<Option<u8>> = None;
59 // The lint allows this
60 let expr = Some(Some(true));