Rollup merge of #35754 - QuietMisdreavus:must-use-reference, r=Manishearth

Add `must_use` to the Reference

I'm a bit uncertain about the exact phrasing, but having it mentioned at all is probably better than before.
This commit is contained in:
Jonathan Turner 2016-09-02 15:28:50 -07:00 committed by GitHub
commit dfe0f88de8
1 changed files with 3 additions and 0 deletions

View File

@ -2071,6 +2071,9 @@ macro scope.
trait of the same name. `{Self}` will be replaced with the type that is supposed
to implement the trait but doesn't. To use this, the `on_unimplemented` feature gate
must be enabled.
- `must_use` - on structs and enums, will warn if a value of this type isn't used or
assigned to a variable. You may also include an optional message by using
`#[must_use = "message"]` which will be given alongside the warning.
### Conditional compilation