Skip to content

Commit e3c4773

Browse files
committed
---
yaml --- r: 194269 b: refs/heads/tmp c: 5e47c66 h: refs/heads/master i: 194267: 48b1537 v: v3
1 parent 0661d55 commit e3c4773

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
@@ -34,7 +34,7 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: a3b13610c5b93d9ada072471a001a5613df6a960
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: 61ff823c63d90f323872862053e928b5a9c874e4
37+
refs/heads/tmp: 5e47c6655b41a1bbabb2b2f8891e0a41c9c60b5c
3838
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3939
refs/tags/homu-tmp: 28a0b25f424090255966273994748a9f9901059f
4040
refs/heads/gate: 97c84447b65164731087ea82685580cc81424412

branches/tmp/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)