We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
must_use
1 parent 6c0d66a commit 0384722Copy full SHA for 0384722
src/doc/reference.md
@@ -2070,6 +2070,9 @@ macro scope.
2070
trait of the same name. `{Self}` will be replaced with the type that is supposed
2071
to implement the trait but doesn't. To use this, the `on_unimplemented` feature gate
2072
must be enabled.
2073
+- `must_use` - on structs and enums, will warn if a value of this type isn't used or
2074
+ assigned to a variable. You may also include an optional message by using
2075
+ `#[must_use = "message"]` which will be given alongside the warning.
2076
2077
### Conditional compilation
2078
0 commit comments