diff options
| -rw-r--r-- | src/test/run-fail/overflowing-lsh-4.rs | 3 | ||||
| -rw-r--r-- | src/test/run-fail/overflowing-rsh-4.rs | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/test/run-fail/overflowing-lsh-4.rs b/src/test/run-fail/overflowing-lsh-4.rs index e7e5e6e6b9b..ed25876cec4 100644 --- a/src/test/run-fail/overflowing-lsh-4.rs +++ b/src/test/run-fail/overflowing-lsh-4.rs @@ -18,7 +18,8 @@ fn id<T>(x: T) -> T { x } fn main() { - let x = 1_i8 << id(17); // signals overflow when checking is on + // this signals overflow when checking is on + let x = 1_i8 << id(17); // ... but when checking is off, the fallback will truncate the // input to its lower three bits (= 1). Note that this is *not* diff --git a/src/test/run-fail/overflowing-rsh-4.rs b/src/test/run-fail/overflowing-rsh-4.rs index c8e6c918e99..6e79a13d4e1 100644 --- a/src/test/run-fail/overflowing-rsh-4.rs +++ b/src/test/run-fail/overflowing-rsh-4.rs @@ -18,7 +18,8 @@ fn id<T>(x: T) -> T { x } fn main() { - let x = 2_i8 >> id(17); // signals overflow when checking is on + // this signals overflow when checking is on + let x = 2_i8 >> id(17); // ... but when checking is off, the fallback will truncate the // input to its lower three bits (= 1). Note that this is *not* |
