Skip to content

Commit

Permalink
Rollup merge of rust-lang#69479 - matthiaskrgr:op_pred, r=Dylan-DPC
Browse files Browse the repository at this point in the history
clarify operator precedence
  • Loading branch information
Dylan-DPC authored Feb 26, 2020
2 parents 9f42fa8 + 1a6b930 commit b48432f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libcore/hash/sip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ impl<S: Sip> super::Hasher for Hasher<S> {

if self.ntail != 0 {
needed = 8 - self.ntail;
self.tail |= unsafe { u8to64_le(msg, 0, cmp::min(length, needed)) } << 8 * self.ntail;
self.tail |= unsafe { u8to64_le(msg, 0, cmp::min(length, needed)) } << (8 * self.ntail);
if length < needed {
self.ntail += length;
return;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/query/on_disk_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ impl SpecializedEncoder<IntEncodedWithFixedSize> for opaque::Encoder {
fn specialized_encode(&mut self, x: &IntEncodedWithFixedSize) -> Result<(), Self::Error> {
let start_pos = self.position();
for i in 0..IntEncodedWithFixedSize::ENCODED_SIZE {
((x.0 >> i * 8) as u8).encode(self)?;
((x.0 >> (i * 8)) as u8).encode(self)?;
}
let end_pos = self.position();
assert_eq!((end_pos - start_pos), IntEncodedWithFixedSize::ENCODED_SIZE);
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_data_structures/sip128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ impl Hasher for SipHasher128 {

if self.ntail != 0 {
needed = 8 - self.ntail;
self.tail |= unsafe { u8to64_le(msg, 0, cmp::min(length, needed)) } << 8 * self.ntail;
self.tail |= unsafe { u8to64_le(msg, 0, cmp::min(length, needed)) } << (8 * self.ntail);
if length < needed {
self.ntail += length;
return;
Expand Down

0 comments on commit b48432f

Please sign in to comment.