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:4:10
4 LL | const C: Option<Option<i32>> = None;
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:11
16 LL | static S: Option<Option<i32>> = None;
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:7:13
22 LL | fn input(_: 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:9:16
28 LL | fn output() -> Option<Option<u8>> {
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:13:27
34 LL | fn output_nested() -> Vec<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:18:30
40 LL | fn output_nested_nested() -> Option<Option<Option<u8>>> {
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
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:23:8
46 LL | x: 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:27:23
52 LL | fn struct_fn() -> 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:33:22
58 LL | fn trait_fn() -> 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:37:11
64 LL | Tuple(Option<Option<u8>>),
67 error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
68 --> $DIR/option_option.rs:38:17
70 LL | Struct { x: Option<Option<u8>> },
73 error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
74 --> $DIR/option_option.rs:79:14
76 LL | foo: Option<Option<Cow<'a, str>>>,
77 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79 error: aborting due to 12 previous errors