Auto merge of #13241 - alex-semenyuk:fix_double_must_use, r=xFrednet

Fix confusing message in double_must_use lint

Close #13003
As mentioned at #13003 it isn't quite clear what it means "an empty `#[must_use]` attribute" so clarify it

changelog: [none]
This commit is contained in:
bors 2024-08-20 15:58:30 +00:00
commit 70650de720
3 changed files with 14 additions and 14 deletions

View file

@ -129,9 +129,9 @@ fn check_needless_must_use(
cx,
DOUBLE_MUST_USE,
fn_header_span,
"this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]`",
"this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]`",
None,
"either add some descriptive text or remove the attribute",
"either add some descriptive message or remove the attribute",
);
}
}