-
-
Notifications
You must be signed in to change notification settings - Fork 117
Description
I also think I am inadvertently suggesting another lint: If a maintainer removes a must_use, in version
1.2.3and someone writes code without removing it, that person cannot downgrade to 1.2.2 without clippy breaking. Therefore, removing amust_usewould also be a minor bump.
Originally posted by @schneems in #1278
This would be in the same category as non-breaking API additions: it should be allow-by-default and opt-in.
We'll need variants of the lint for all places where #[must_use] may appear. Use the existing "#[must_use] removed" lints to guide where a corresponding removal lint should exist.
-
struct_must_use_removed: Addstruct_must_use_removed#1392 -
inherent_method_must_use_removed: Inherent method must_use removed #1516 -
function_must_use_removed: Addfunction_must_use_removed#1400 -
trait_must_use_removed: Add lint trait_must_use_removed #1515 -
union_must_use_removed: Addunion_must_use_removed#1399
Rust 1.89 has a bug around Our minimum supported Rust version is 1.90+ so the 1.89 bug is no longer a concern.#[must_use] that makes the attribute not appear as expected in rustdoc JSON. You'll likely need to add each new lint here to the list of exemptions for Rust 1.89 tests here