summaryrefslogtreecommitdiff
path: root/user/rust/0019-run-pass-const-endianness-negate-before-to_le.patch
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2018-09-19 02:31:46 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-09-25 00:08:16 +0000
commitcd980d29292f8f5d6bb8bef5773ce91b95bfb90a (patch)
tree7eeb0fd1825894538eea675625a9f3009f3fca9d /user/rust/0019-run-pass-const-endianness-negate-before-to_le.patch
parent63266fdc6f2014cc6dfd0f983e13de7c378bc708 (diff)
downloadpackages-cd980d29292f8f5d6bb8bef5773ce91b95bfb90a.tar.gz
packages-cd980d29292f8f5d6bb8bef5773ce91b95bfb90a.tar.bz2
packages-cd980d29292f8f5d6bb8bef5773ce91b95bfb90a.tar.xz
packages-cd980d29292f8f5d6bb8bef5773ce91b95bfb90a.zip
user/rust: new package
Diffstat (limited to 'user/rust/0019-run-pass-const-endianness-negate-before-to_le.patch')
-rw-r--r--user/rust/0019-run-pass-const-endianness-negate-before-to_le.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/user/rust/0019-run-pass-const-endianness-negate-before-to_le.patch b/user/rust/0019-run-pass-const-endianness-negate-before-to_le.patch
new file mode 100644
index 000000000..a024abc21
--- /dev/null
+++ b/user/rust/0019-run-pass-const-endianness-negate-before-to_le.patch
@@ -0,0 +1,29 @@
+From c38c7916aca7d0d0aa1d860ae16ec8743515c94c Mon Sep 17 00:00:00 2001
+From: Josh Stone <jistone@redhat.com>
+Date: Mon, 30 Jul 2018 13:08:56 -0700
+Subject: [PATCH 19/28] run-pass/const-endianness: negate before to_le()
+
+`const LE_I128` needs parentheses to negate the value *before* calling
+`to_le()`, otherwise it doesn't match the operations performed in the
+black-boxed part of the test. This only makes a tangible difference on
+big-endian targets.
+---
+ src/test/run-pass/const-endianess.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/test/run-pass/const-endianess.rs b/src/test/run-pass/const-endianess.rs
+index fa34b49210..95c738d3ec 100644
+--- a/src/test/run-pass/const-endianess.rs
++++ b/src/test/run-pass/const-endianess.rs
+@@ -25,7 +25,7 @@ fn main() {
+ #[cfg(not(target_arch = "asmjs"))]
+ {
+ const BE_U128: u128 = 999999u128.to_be();
+- const LE_I128: i128 = -999999i128.to_le();
++ const LE_I128: i128 = (-999999i128).to_le();
+ assert_eq!(BE_U128, b(999999u128).to_be());
+ assert_eq!(LE_I128, b(-999999i128).to_le());
+ }
+--
+2.18.0
+