Skip to content

Commit 1ac90aa

Browse files
committed
---
yaml --- r: 192382 b: refs/heads/auto c: 5e47c66 h: refs/heads/master v: v3
1 parent db4b5de commit 1ac90aa

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 61ff823c63d90f323872862053e928b5a9c874e4
13+
refs/heads/auto: 5e47c6655b41a1bbabb2b2f8891e0a41c9c60b5c
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/test/run-pass/shift-near-oflo.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ fn test_left_shift() {
2626

2727
macro_rules! tests {
2828
($iN:ty, $uN:ty, $max_rhs:expr, $expect_i:expr, $expect_u:expr) => { {
29-
let x = 1 as $iN << id(0);
29+
let x = (1 as $iN) << id(0);
3030
assert_eq!(x, 1);
31-
let x = 1 as $uN << id(0);
31+
let x = (1 as $uN) << id(0);
3232
assert_eq!(x, 1);
33-
let x = 1 as $iN << id($max_rhs);
33+
let x = (1 as $iN) << id($max_rhs);
3434
assert_eq!(x, $expect_i);
35-
let x = 1 as $uN << id($max_rhs);
35+
let x = (1 as $uN) << id($max_rhs);
3636
assert_eq!(x, $expect_u);
3737
// high-order bits on LHS are silently discarded without panic.
38-
let x = 3 as $iN << id($max_rhs);
38+
let x = (3 as $iN) << id($max_rhs);
3939
assert_eq!(x, $expect_i);
40-
let x = 3 as $uN << id($max_rhs);
40+
let x = (3 as $uN) << id($max_rhs);
4141
assert_eq!(x, $expect_u);
4242
} }
4343
}
@@ -71,23 +71,23 @@ fn test_right_shift() {
7171
($iN:ty, $uN:ty, $max_rhs:expr,
7272
$signbit_i:expr, $highbit_i:expr, $highbit_u:expr) =>
7373
{ {
74-
let x = 1 as $iN >> id(0);
74+
let x = (1 as $iN) >> id(0);
7575
assert_eq!(x, 1);
76-
let x = 1 as $uN >> id(0);
76+
let x = (1 as $uN) >> id(0);
7777
assert_eq!(x, 1);
78-
let x = $highbit_i >> id($max_rhs-1);
78+
let x = ($highbit_i) >> id($max_rhs-1);
7979
assert_eq!(x, 1);
80-
let x = $highbit_u >> id($max_rhs);
80+
let x = ($highbit_u) >> id($max_rhs);
8181
assert_eq!(x, 1);
8282
// sign-bit is carried by arithmetic right shift
83-
let x = $signbit_i >> id($max_rhs);
83+
let x = ($signbit_i) >> id($max_rhs);
8484
assert_eq!(x, -1);
8585
// low-order bits on LHS are silently discarded without panic.
86-
let x = $highbit_i + 1 >> id($max_rhs-1);
86+
let x = ($highbit_i + 1) >> id($max_rhs-1);
8787
assert_eq!(x, 1);
88-
let x = $highbit_u + 1 >> id($max_rhs);
88+
let x = ($highbit_u + 1) >> id($max_rhs);
8989
assert_eq!(x, 1);
90-
let x = $signbit_i + 1 >> id($max_rhs);
90+
let x = ($signbit_i + 1) >> id($max_rhs);
9191
assert_eq!(x, -1);
9292
} }
9393
}

0 commit comments

Comments
 (0)