rust/tests/ui/result_unit_error.stderr

36 lines
1 KiB
Text
Raw Normal View History

2020-10-11 13:27:20 +02:00
error: This returns a `Result<_, ()>
--> $DIR/result_unit_error.rs:4:1
|
LL | pub fn returns_unit_error() -> Result<u32, ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::result-unit-err` implied by `-D warnings`
= help: Use a custom Error type instead
error: This returns a `Result<_, ()>
--> $DIR/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<_, ()>
--> $DIR/result_unit_error.rs:15: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:33:5
|
LL | pub fn unit_error(&self) -> Result<usize, ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: Use a custom Error type instead
error: aborting due to 4 previous errors