diff options
| author | bors <bors@rust-lang.org> | 2021-10-11 14:16:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-10-11 14:16:15 +0000 |
| commit | 1067e2ca5e9cfe5c79f956e49ffc684c5142d49b (patch) | |
| tree | e5f2a3b0156efd5a28e933c42629ce4b443f0b9a /library/core/src/sync | |
| parent | 6ae8912a3e7d2c4c775024f58a7ba4b1aedc4073 (diff) | |
| parent | 913b1de0ec1da8cdf5e8ad1c418fe4ad61e1e79d (diff) | |
Auto merge of #89767 - GuillaumeGomez:rollup-sczixhk, r=GuillaumeGomez
Rollup of 7 pull requests Successful merges: - #89655 (bootstrap: don't use `--merges` to look for commit hashes for downloading artifacts) - #89726 (Add #[must_use] to alloc constructors) - #89729 (Add #[must_use] to core and std constructors) - #89743 (Fix RUSTC_LOG handling) - #89753 (Add #[must_use] to from_value conversions) - #89754 (Cleanup .item-table CSS) - #89761 (:arrow_up: rust-analyzer) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/core/src/sync')
| -rw-r--r-- | library/core/src/sync/atomic.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs index d9de37e9c51..b07752116e5 100644 --- a/library/core/src/sync/atomic.rs +++ b/library/core/src/sync/atomic.rs @@ -290,6 +290,7 @@ impl AtomicBool { #[inline] #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_stable(feature = "const_atomic_new", since = "1.24.0")] + #[must_use] pub const fn new(v: bool) -> AtomicBool { AtomicBool { v: UnsafeCell::new(v as u8) } } @@ -1392,6 +1393,7 @@ macro_rules! atomic_int { #[inline] #[$stable] #[$const_stable] + #[must_use] pub const fn new(v: $int_type) -> Self { Self {v: UnsafeCell::new(v)} } |
