blob: 02ef9f3a1b7eaae8378e9a51f3455c915fc7e694 [file]
error: this returns a `Result<_, ()>`
--> tests/ui/result_unit_error.rs:3:1
|
LL | pub fn returns_unit_error() -> Result<u32, ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use a custom `Error` type instead
= note: `-D clippy::result-unit-err` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::result_unit_err)]`
error: this returns a `Result<_, ()>`
--> tests/ui/result_unit_error.rs:14:5
|
LL | fn get_that_error(&self) -> Result<bool, ()>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use a custom `Error` type instead
error: this returns a `Result<_, ()>`
--> tests/ui/result_unit_error.rs:17:5
|
LL | fn get_this_one_too(&self) -> Result<bool, ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use a custom `Error` type instead
error: this returns a `Result<_, ()>`
--> tests/ui/result_unit_error.rs:37:5
|
LL | pub fn unit_error(&self) -> Result<usize, ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use a custom `Error` type instead
error: this returns a `Result<_, ()>`
--> tests/ui/result_unit_error.rs:48:5
|
LL | pub fn should_lint() -> ResInv<(), usize> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use a custom `Error` type instead
error: this returns a `Result<_, ()>`
--> tests/ui/result_unit_error.rs:66:5
|
LL | pub async fn returns_unit_error_async() -> Result<u32, ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use a custom `Error` type instead
error: aborting due to 6 previous errors