mirror of
https://git.proxmox.com/git/rustc
synced 2026-02-03 12:11:10 +00:00
Add some more big-endian test patches
This commit is contained in:
parent
8d75401f0c
commit
ac5bcd9b96
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
||||
rustc (1.45.0+dfsg1-2) UNRELEASED; urgency=medium
|
||||
|
||||
* Add some more big-endian test patches.
|
||||
|
||||
-- Ximin Luo <infinity0@debian.org> Thu, 06 Aug 2020 14:21:07 +0100
|
||||
|
||||
rustc (1.45.0+dfsg1-1) unstable; urgency=medium
|
||||
|
||||
* Upload to unstable.
|
||||
|
||||
2
debian/patches/series
vendored
2
debian/patches/series
vendored
@ -8,6 +8,8 @@ u-mips-fixes.diff
|
||||
#u-allow-system-compiler-rt.patch
|
||||
u-fix-exec.patch
|
||||
u-ignore-endian.patch
|
||||
u-fb9fa5ba3ee08171e7d2ff35d28ec0dd93b0287b.patch
|
||||
u-1629fed4c0bdc6d3246ea63a91f600bcb8874626.patch
|
||||
|
||||
# not forwarded, or forwarded but unlikely to be merged
|
||||
u-rustc-llvm-cross-flags.patch
|
||||
|
||||
32
debian/patches/u-1629fed4c0bdc6d3246ea63a91f600bcb8874626.patch
vendored
Normal file
32
debian/patches/u-1629fed4c0bdc6d3246ea63a91f600bcb8874626.patch
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
From 1629fed4c0bdc6d3246ea63a91f600bcb8874626 Mon Sep 17 00:00:00 2001
|
||||
From: Yuki Okushi <huyuumi.dev@gmail.com>
|
||||
Date: Fri, 31 Jul 2020 09:03:14 +0900
|
||||
Subject: [PATCH] Presort restrictions to make output consistent
|
||||
|
||||
---
|
||||
src/librustc_typeck/check/method/suggest.rs | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/librustc_typeck/check/method/suggest.rs b/src/librustc_typeck/check/method/suggest.rs
|
||||
index ae2cf6daf5350..e69102d1995d3 100644
|
||||
--- a/src/librustc_typeck/check/method/suggest.rs
|
||||
+++ b/src/librustc_typeck/check/method/suggest.rs
|
||||
@@ -678,6 +678,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
.collect::<Vec<(usize, String)>>();
|
||||
for ((span, empty_where), obligations) in type_params.into_iter() {
|
||||
restrict_type_params = true;
|
||||
+ // #74886: Sort here so that the output is always the same.
|
||||
+ let mut obligations = obligations.into_iter().collect::<Vec<_>>();
|
||||
+ obligations.sort();
|
||||
err.span_suggestion_verbose(
|
||||
span,
|
||||
&format!(
|
||||
@@ -688,7 +691,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
format!(
|
||||
"{} {}",
|
||||
if empty_where { " where" } else { "," },
|
||||
- obligations.into_iter().collect::<Vec<_>>().join(", ")
|
||||
+ obligations.join(", ")
|
||||
),
|
||||
Applicability::MaybeIncorrect,
|
||||
);
|
||||
56
debian/patches/u-fb9fa5ba3ee08171e7d2ff35d28ec0dd93b0287b.patch
vendored
Normal file
56
debian/patches/u-fb9fa5ba3ee08171e7d2ff35d28ec0dd93b0287b.patch
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
From fb9fa5ba3ee08171e7d2ff35d28ec0dd93b0287b Mon Sep 17 00:00:00 2001
|
||||
From: Ralf Jung <post@ralfj.de>
|
||||
Date: Fri, 3 Jul 2020 12:12:50 +0200
|
||||
Subject: [PATCH] adjust ub-enum test to be endianess-independent
|
||||
|
||||
---
|
||||
src/test/ui/consts/const-eval/ub-enum.rs | 5 +++--
|
||||
src/test/ui/consts/const-eval/ub-enum.stderr | 12 ++++++------
|
||||
2 files changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/test/ui/consts/const-eval/ub-enum.rs b/src/test/ui/consts/const-eval/ub-enum.rs
|
||||
index c49997c6c33f6..136b33208c293 100644
|
||||
--- a/src/test/ui/consts/const-eval/ub-enum.rs
|
||||
+++ b/src/test/ui/consts/const-eval/ub-enum.rs
|
||||
@@ -88,9 +88,10 @@ const BAD_OPTION_CHAR: Option<(char, char)> = Some(('x', unsafe { mem::transmute
|
||||
//~^ ERROR is undefined behavior
|
||||
|
||||
// All variants are uninhabited but also have data.
|
||||
-const BAD_UNINHABITED_WITH_DATA1: Result<(i32, Never), (i32, !)> = unsafe { mem::transmute(1u64) };
|
||||
+// Use `0` as constant to make behavior endianess-independent.
|
||||
+const BAD_UNINHABITED_WITH_DATA1: Result<(i32, Never), (i32, !)> = unsafe { mem::transmute(0u64) };
|
||||
//~^ ERROR is undefined behavior
|
||||
-const BAD_UNINHABITED_WITH_DATA2: Result<(i32, !), (i32, Never)> = unsafe { mem::transmute(1u64) };
|
||||
+const BAD_UNINHABITED_WITH_DATA2: Result<(i32, !), (i32, Never)> = unsafe { mem::transmute(0u64) };
|
||||
//~^ ERROR is undefined behavior
|
||||
|
||||
fn main() {
|
||||
diff --git a/src/test/ui/consts/const-eval/ub-enum.stderr b/src/test/ui/consts/const-eval/ub-enum.stderr
|
||||
index 1f7593c6db9b6..9c29aa1a51d1c 100644
|
||||
--- a/src/test/ui/consts/const-eval/ub-enum.stderr
|
||||
+++ b/src/test/ui/consts/const-eval/ub-enum.stderr
|
||||
@@ -87,18 +87,18 @@ LL | const BAD_OPTION_CHAR: Option<(char, char)> = Some(('x', unsafe { mem::tran
|
||||
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
|
||||
|
||||
error[E0080]: it is undefined behavior to use this value
|
||||
- --> $DIR/ub-enum.rs:91:1
|
||||
+ --> $DIR/ub-enum.rs:92:1
|
||||
|
|
||||
-LL | const BAD_UNINHABITED_WITH_DATA1: Result<(i32, Never), (i32, !)> = unsafe { mem::transmute(1u64) };
|
||||
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of the never type `!` at .<enum-variant(Err)>.0.1
|
||||
+LL | const BAD_UNINHABITED_WITH_DATA1: Result<(i32, Never), (i32, !)> = unsafe { mem::transmute(0u64) };
|
||||
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of uninhabited type Never at .<enum-variant(Ok)>.0.1
|
||||
|
|
||||
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
|
||||
|
||||
error[E0080]: it is undefined behavior to use this value
|
||||
- --> $DIR/ub-enum.rs:93:1
|
||||
+ --> $DIR/ub-enum.rs:94:1
|
||||
|
|
||||
-LL | const BAD_UNINHABITED_WITH_DATA2: Result<(i32, !), (i32, Never)> = unsafe { mem::transmute(1u64) };
|
||||
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of uninhabited type Never at .<enum-variant(Err)>.0.1
|
||||
+LL | const BAD_UNINHABITED_WITH_DATA2: Result<(i32, !), (i32, Never)> = unsafe { mem::transmute(0u64) };
|
||||
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of the never type `!` at .<enum-variant(Ok)>.0.1
|
||||
|
|
||||
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
|
||||
|
||||
24
debian/patches/u-ignore-endian.patch
vendored
24
debian/patches/u-ignore-endian.patch
vendored
@ -94,3 +94,27 @@
|
||||
// EMIT_MIR rustc.main.Inline.diff
|
||||
fn main() {
|
||||
let _x: Box<Vec<u32>> = box Vec::new();
|
||||
--- a/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs
|
||||
+++ b/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs
|
||||
@@ -2,6 +2,7 @@
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
// ignore-emscripten
|
||||
+// ignore-endian-big behavior of simd_bitmask is endian-specific
|
||||
|
||||
// Test that the simd_bitmask intrinsic produces correct results.
|
||||
|
||||
--- a/src/test/ui/simd/simd-intrinsic-generic-select.rs
|
||||
+++ b/src/test/ui/simd/simd-intrinsic-generic-select.rs
|
||||
@@ -2,10 +2,7 @@
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
// ignore-emscripten
|
||||
-// ignore-mips behavior of simd_select_bitmask is endian-specific
|
||||
-// ignore-mips64 behavior of simd_select_bitmask is endian-specific
|
||||
-// ignore-powerpc behavior of simd_select_bitmask is endian-specific
|
||||
-// ignore-powerpc64 behavior of simd_select_bitmask is endian-specific
|
||||
+// ignore-endian-big behavior of simd_select_bitmask is endian-specific
|
||||
|
||||
// Test that the simd_select intrinsics produces correct results.
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user