]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/option_option.stderr
Auto merge of #97944 - nikic:freebsd-update, r=Mark-Simulacrum
[rust.git] / src / tools / clippy / tests / ui / option_option.stderr
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
3    |
4 LL | const C: Option<Option<i32>> = None;
5    |          ^^^^^^^^^^^^^^^^^^^
6    |
7 note: the lint level is defined here
8   --> $DIR/option_option.rs:1:9
9    |
10 LL | #![deny(clippy::option_option)]
11    |         ^^^^^^^^^^^^^^^^^^^^^
12
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
15    |
16 LL | static S: Option<Option<i32>> = None;
17    |           ^^^^^^^^^^^^^^^^^^^
18
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
21    |
22 LL | fn input(_: Option<Option<u8>>) {}
23    |             ^^^^^^^^^^^^^^^^^^
24
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
27    |
28 LL | fn output() -> Option<Option<u8>> {
29    |                ^^^^^^^^^^^^^^^^^^
30
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
33    |
34 LL | fn output_nested() -> Vec<Option<Option<u8>>> {
35    |                           ^^^^^^^^^^^^^^^^^^
36
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
39    |
40 LL | fn output_nested_nested() -> Option<Option<Option<u8>>> {
41    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
42
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
45    |
46 LL |     x: Option<Option<u8>>,
47    |        ^^^^^^^^^^^^^^^^^^
48
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
51    |
52 LL |     fn struct_fn() -> Option<Option<u8>> {
53    |                       ^^^^^^^^^^^^^^^^^^
54
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
57    |
58 LL |     fn trait_fn() -> Option<Option<u8>>;
59    |                      ^^^^^^^^^^^^^^^^^^
60
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
63    |
64 LL |     Tuple(Option<Option<u8>>),
65    |           ^^^^^^^^^^^^^^^^^^
66
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
69    |
70 LL |     Struct { x: Option<Option<u8>> },
71    |                 ^^^^^^^^^^^^^^^^^^
72
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
75    |
76 LL |         foo: Option<Option<Cow<'a, str>>>,
77    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
78
79 error: aborting due to 12 previous errors
80