1 error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
2 --> $DIR/option_option.rs:3:13
4 LL | fn input(_: Option<Option<u8>>) {}
7 note: the lint level is defined here
8 --> $DIR/option_option.rs:1:9
10 LL | #![deny(clippy::option_option)]
11 | ^^^^^^^^^^^^^^^^^^^^^
13 error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
14 --> $DIR/option_option.rs:5:16
16 LL | fn output() -> Option<Option<u8>> {
19 error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
20 --> $DIR/option_option.rs:9:27
22 LL | fn output_nested() -> Vec<Option<Option<u8>>> {
25 error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
26 --> $DIR/option_option.rs:14:30
28 LL | fn output_nested_nested() -> Option<Option<Option<u8>>> {
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
31 error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
32 --> $DIR/option_option.rs:19:8
34 LL | x: Option<Option<u8>>,
37 error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
38 --> $DIR/option_option.rs:23:23
40 LL | fn struct_fn() -> Option<Option<u8>> {
43 error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
44 --> $DIR/option_option.rs:29:22
46 LL | fn trait_fn() -> Option<Option<u8>>;
49 error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
50 --> $DIR/option_option.rs:33:11
52 LL | Tuple(Option<Option<u8>>),
55 error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
56 --> $DIR/option_option.rs:34:17
58 LL | Struct { x: Option<Option<u8>> },
61 error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
62 --> $DIR/option_option.rs:77:14
64 LL | foo: Option<Option<Cow<'a, str>>>,
65 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67 error: aborting due to 10 previous errors