-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Adding #[must_use]
on an item
#159
Comments
According to Rust Reference about
The following schema additions should be implemented to enable all of the lints (or are closely related to them):
The |
When
#[must_use]
is added, code in downstream crates that did not use a value of that type will get a compiler lint.New lints for existing code requires a minor version: https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md#minor-change-introducing-new-lint-warningserrors
We want to support both "bare"
#[must_use]
and the form with a reason:#[must_use = "foo bar"]
The text was updated successfully, but these errors were encountered: