blob: 1c39f9acae8e385ad7759464fb56cb965a1b6a1c [file] [log] [blame]
error: use of `Option<Option<T>>`
--> tests/ui/option_option.rs:4:10
|
LL | const C: Option<Option<i32>> = None;
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider using `Option<i32>`, or a custom enum if you need to distinguish all 3 cases
= note: `-D clippy::option-option` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::option_option)]`
error: use of `Option<Option<T>>`
--> tests/ui/option_option.rs:6:11
|
LL | static S: Option<Option<i32>> = None;
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider using `Option<i32>`, or a custom enum if you need to distinguish all 3 cases
error: use of `Option<Option<T>>`
--> tests/ui/option_option.rs:9:13
|
LL | fn input(_: Option<Option<u8>>) {}
| ^^^^^^^^^^^^^^^^^^
|
= help: consider using `Option<u8>`, or a custom enum if you need to distinguish all 3 cases
error: use of `Option<Option<T>>`
--> tests/ui/option_option.rs:12:16
|
LL | fn output() -> Option<Option<u8>> {
| ^^^^^^^^^^^^^^^^^^
|
= help: consider using `Option<u8>`, or a custom enum if you need to distinguish all 3 cases
error: use of `Option<Option<T>>`
--> tests/ui/option_option.rs:17:27
|
LL | fn output_nested() -> Vec<Option<Option<u8>>> {
| ^^^^^^^^^^^^^^^^^^
|
= help: consider using `Option<u8>`, or a custom enum if you need to distinguish all 3 cases
error: use of `Option<Option<T>>`
--> tests/ui/option_option.rs:23:30
|
LL | fn output_nested_nested() -> Option<Option<Option<u8>>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `Option<Option<u8>>`, or a custom enum if you need to distinguish all 3 cases
error: use of `Option<Option<T>>`
--> tests/ui/option_option.rs:29:8
|
LL | x: Option<Option<u8>>,
| ^^^^^^^^^^^^^^^^^^
|
= help: consider using `Option<u8>`, or a custom enum if you need to distinguish all 3 cases
error: use of `Option<Option<T>>`
--> tests/ui/option_option.rs:34:23
|
LL | fn struct_fn() -> Option<Option<u8>> {
| ^^^^^^^^^^^^^^^^^^
|
= help: consider using `Option<u8>`, or a custom enum if you need to distinguish all 3 cases
error: use of `Option<Option<T>>`
--> tests/ui/option_option.rs:41:22
|
LL | fn trait_fn() -> Option<Option<u8>>;
| ^^^^^^^^^^^^^^^^^^
|
= help: consider using `Option<u8>`, or a custom enum if you need to distinguish all 3 cases
error: use of `Option<Option<T>>`
--> tests/ui/option_option.rs:46:11
|
LL | Tuple(Option<Option<u8>>),
| ^^^^^^^^^^^^^^^^^^
|
= help: consider using `Option<u8>`, or a custom enum if you need to distinguish all 3 cases
error: use of `Option<Option<T>>`
--> tests/ui/option_option.rs:48:17
|
LL | Struct { x: Option<Option<u8>> },
| ^^^^^^^^^^^^^^^^^^
|
= help: consider using `Option<u8>`, or a custom enum if you need to distinguish all 3 cases
error: use of `Option<Option<T>>`
--> tests/ui/option_option.rs:90:14
|
LL | foo: Option<Option<Cow<'a, str>>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `Option<Cow<'a, str>>`, or a custom enum if you need to distinguish all 3 cases
error: aborting due to 12 previous errors