Fix false negative on Result<(), ()>

This commit is contained in:
blyxyas 2023-04-03 16:01:30 +02:00
parent d602743558
commit a37eb4dfc9
No known key found for this signature in database
GPG key ID: 4D38170B5A2FC334
2 changed files with 20 additions and 2 deletions

View file

@ -23,5 +23,13 @@ LL | pub fn must_use_array() -> [Result<(), ()>; 1] {
|
= help: either add some descriptive text or remove the attribute
error: aborting due to 3 previous errors
error: this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]`
--> $DIR/double_must_use.rs:31:1
|
LL | async fn async_must_use_result() -> Result<(), ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: either add some descriptive text or remove the attribute
error: aborting due to 4 previous errors