rust-clippy/tests/ui/result_unit_error.stderr

45 lines
1.4 KiB
Text
Raw Normal View History

error: this returns a `Result<_, ()>`
2024-02-17 12:16:29 +00:00
--> tests/ui/result_unit_error.rs:3:1
|
LL | pub fn returns_unit_error() -> Result<u32, ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use a custom `Error` type instead
2022-09-22 16:04:22 +00:00
= 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<_, ()>`
2024-02-17 12:16:29 +00:00
--> tests/ui/result_unit_error.rs:13:5
|
LL | fn get_that_error(&self) -> Result<bool, ()>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use a custom `Error` type instead
error: this returns a `Result<_, ()>`
2024-02-17 12:16:29 +00:00
--> tests/ui/result_unit_error.rs:16:5
|
LL | fn get_this_one_too(&self) -> Result<bool, ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use a custom `Error` type instead
error: this returns a `Result<_, ()>`
2024-02-17 12:16:29 +00:00
--> tests/ui/result_unit_error.rs:35:5
|
LL | pub fn unit_error(&self) -> Result<usize, ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use a custom `Error` type instead
error: this returns a `Result<_, ()>`
2024-02-17 12:16:29 +00:00
--> tests/ui/result_unit_error.rs:45:5
|
LL | pub fn should_lint() -> ResInv<(), usize> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use a custom `Error` type instead
error: aborting due to 5 previous errors