about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-10-11 14:11:42 +0200
committerGitHub <noreply@github.com>2021-10-11 14:11:42 +0200
commitd7c9693401e590cce78ea74d8576a124266025d6 (patch)
tree8d9bb38518242b0e6f494990b4439becaa78f76e /src/test/codegen/src-hash-algorithm
parent08a7a5759a2ac8da317a5fdb0cf827cea605e12b (diff)
parentecd7ea8a9c4abd3c3d0b23eda9e1a35bbe70215a (diff)
downloadrust-d7c9693401e590cce78ea74d8576a124266025d6.tar.gz
rust-d7c9693401e590cce78ea74d8576a124266025d6.zip
Rollup merge of #89726 - jkugelman:must-use-alloc-constructors, r=joshtriplett
Add #[must_use] to alloc constructors

Added `#[must_use]`. to the various forms of `new`, `pin`, and `with_capacity` in the `alloc` crate. No extra explanations given as I couldn't think of anything useful to add.

I figure this deserves extra scrutiny compared to the other PRs I've done so far. In particular:

* The 4 `pin`/`pin_in` methods I touched. Are there legitimate use cases for pinning and not using the result? Pinning's a difficult concept I'm not very comfortable with.
* `Box`'s constructors. Do people ever create boxes just for the side effects... allocating or zeroing out memory?

Parent issue: #89692

r? ``@joshtriplett``
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions