diff options
| author | bors <bors@rust-lang.org> | 2020-04-17 04:15:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-04-17 04:15:18 +0000 |
| commit | 861996e13820a2e401df60756a373606b50948e5 (patch) | |
| tree | 7b70bbcac40629669a01366657b05d910289c77b /src/libstd/sync | |
| parent | 318726b301db2a0718d05f166d3d6c578273189c (diff) | |
| parent | 65243a8f7c03425c399d990d0802e4506bbcd754 (diff) | |
| download | rust-861996e13820a2e401df60756a373606b50948e5.tar.gz rust-861996e13820a2e401df60756a373606b50948e5.zip | |
Auto merge of #71230 - Dylan-DPC:rollup-rofigbv, r=Dylan-DPC
Rollup of 7 pull requests Successful merges: - #70578 (Add long error explanation for E0657) - #70910 (Hides default fns inside Fuse impl to avoid exposing it to any crate) - #71164 (reword Miri validity errors: undefined -> uninitialized) - #71182 (Add some regression tests) - #71206 (Miri error messages: avoid try terminology) - #71220 (Dogfood or_patterns in the standard library) - #71225 (Fix typo in Default trait docs: Provides -> Provide) Failed merges: r? @ghost
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/mpsc/oneshot.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sync/mpsc/stream.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sync/mpsc/oneshot.rs b/src/libstd/sync/mpsc/oneshot.rs index 5b41525e06a..75f5621fa12 100644 --- a/src/libstd/sync/mpsc/oneshot.rs +++ b/src/libstd/sync/mpsc/oneshot.rs @@ -260,7 +260,7 @@ impl<T> Packet<T> { let state = match self.state.load(Ordering::SeqCst) { // Each of these states means that no further activity will happen // with regard to abortion selection - s @ EMPTY | s @ DATA | s @ DISCONNECTED => s, + s @ (EMPTY | DATA | DISCONNECTED) => s, // If we've got a blocked thread, then use an atomic to gain ownership // of it (may fail) diff --git a/src/libstd/sync/mpsc/stream.rs b/src/libstd/sync/mpsc/stream.rs index f33493ee0c9..26b4faebd86 100644 --- a/src/libstd/sync/mpsc/stream.rs +++ b/src/libstd/sync/mpsc/stream.rs @@ -205,7 +205,7 @@ impl<T> Packet<T> { // Messages which actually popped from the queue shouldn't count as // a steal, so offset the decrement here (we already have our // "steal" factored into the channel count above). - data @ Ok(..) | data @ Err(Upgraded(..)) => unsafe { + data @ (Ok(..) | Err(Upgraded(..))) => unsafe { *self.queue.consumer_addition().steals.get() -= 1; data }, |
