mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-15 01:55:03 +00:00
44 lines
1.3 KiB
Plaintext
44 lines
1.3 KiB
Plaintext
error: this returns a `Result<_, ()>`
|
|
--> $DIR/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`
|
|
|
|
error: this returns a `Result<_, ()>`
|
|
--> $DIR/result_unit_error.rs:12:5
|
|
|
|
|
LL | fn get_that_error(&self) -> Result<bool, ()>;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: use a custom `Error` type instead
|
|
|
|
error: this returns a `Result<_, ()>`
|
|
--> $DIR/result_unit_error.rs:14:5
|
|
|
|
|
LL | fn get_this_one_too(&self) -> Result<bool, ()> {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: use a custom `Error` type instead
|
|
|
|
error: this returns a `Result<_, ()>`
|
|
--> $DIR/result_unit_error.rs:32:5
|
|
|
|
|
LL | pub fn unit_error(&self) -> Result<usize, ()> {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: use a custom `Error` type instead
|
|
|
|
error: this returns a `Result<_, ()>`
|
|
--> $DIR/result_unit_error.rs:41:5
|
|
|
|
|
LL | pub fn should_lint() -> ResInv<(), usize> {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: use a custom `Error` type instead
|
|
|
|
error: aborting due to 5 previous errors
|
|
|