]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/option_option.stderr
Rollup merge of #78502 - matthewjasper:chalkup, r=nikomatsakis
[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:3:13
3    |
4 LL | fn input(_: Option<Option<u8>>) {}
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:16
15    |
16 LL | fn output() -> Option<Option<u8>> {
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:9:27
21    |
22 LL | fn output_nested() -> Vec<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:14:30
27    |
28 LL | fn output_nested_nested() -> Option<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:19:8
33    |
34 LL |     x: 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:23:23
39    |
40 LL |     fn struct_fn() -> 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:29:22
45    |
46 LL |     fn trait_fn() -> 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:33:11
51    |
52 LL |     Tuple(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:34:17
57    |
58 LL |     Struct { x: 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:77:14
63    |
64 LL |         foo: Option<Option<Cow<'a, str>>>,
65    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
67 error: aborting due to 10 previous errors
68