about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-06-12 15:58:32 +0000
committerbors <bors@rust-lang.org>2024-06-12 15:58:32 +0000
commit1d43fbbc7348f2bd9260d8532bffa02f5bd2c9ac (patch)
treebc04e04a2b07e4e511bb28453ca6adc0fc516191 /src
parent0285dab54f87120367f5693174136aff24b74640 (diff)
parent5d22e7a8813f6a584eb7415cb78182b52ff71e12 (diff)
Auto merge of #126332 - GuillaumeGomez:rollup-bu1q4pz, r=GuillaumeGomez
Rollup of 9 pull requests

Successful merges:

 - #126039 (Promote `arm64ec-pc-windows-msvc` to tier 2)
 - #126075 (Remove `DebugWithInfcx` machinery)
 - #126228 (Provide correct parent for nested anon const)
 - #126232 (interpret: dyn trait metadata check: equate traits in a proper way)
 - #126242 (Simplify provider api to improve llvm ir)
 - #126294 (coverage: Replace the old span refiner with a single function)
 - #126295 (No uninitalized report in a pre-returned match arm)
 - #126312 (Update `rustc-perf` submodule)
 - #126322 (Follow up to splitting core's PanicInfo and std's PanicInfo)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
-rw-r--r--src/ci/github-actions/jobs.yml1
-rw-r--r--src/doc/rustc/src/platform-support.md2
-rw-r--r--src/doc/rustc/src/platform-support/arm64ec-pc-windows-msvc.md11
-rw-r--r--src/tools/build-manifest/src/main.rs1
-rw-r--r--src/tools/miri/tests/fail/dyn-call-trait-mismatch.rs4
-rw-r--r--src/tools/miri/tests/pass/issues/issue-miri-3541-dyn-vtable-trait-normalization.rs40
m---------src/tools/rustc-perf0
7 files changed, 51 insertions, 8 deletions
diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml
index 1db763735e6..010e1b8fd51 100644
--- a/src/ci/github-actions/jobs.yml
+++ b/src/ci/github-actions/jobs.yml
@@ -428,6 +428,7 @@ auto:
       RUST_CONFIGURE_ARGS: >-
         --build=x86_64-pc-windows-msvc
         --host=aarch64-pc-windows-msvc
+        --target=aarch64-pc-windows-msvc,arm64ec-pc-windows-msvc
         --enable-full-tools
         --enable-profiler
       SCRIPT: python x.py dist bootstrap --include-default-paths
diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md
index da97de1f716..c672cff7452 100644
--- a/src/doc/rustc/src/platform-support.md
+++ b/src/doc/rustc/src/platform-support.md
@@ -146,6 +146,7 @@ target | std | notes
 [`arm-linux-androideabi`](platform-support/android.md) | ✓ | Armv6 Android
 `arm-unknown-linux-musleabi` | ✓ | Armv6 Linux with musl 1.2.3
 `arm-unknown-linux-musleabihf` | ✓ | Armv6 Linux with musl 1.2.3, hardfloat
+[`arm64ec-pc-windows-msvc`](platform-support/arm64ec-pc-windows-msvc.md) | ✓ | Arm64EC Windows MSVC
 [`armebv7r-none-eabi`](platform-support/armv7r-none-eabi.md) | * | Bare Armv7-R, Big Endian
 [`armebv7r-none-eabihf`](platform-support/armv7r-none-eabi.md) | * | Bare Armv7-R, Big Endian, hardfloat
 `armv5te-unknown-linux-gnueabi` | ✓ | Armv5TE Linux (kernel 4.4, glibc 2.23)
@@ -240,7 +241,6 @@ target | std | host | notes
 -------|:---:|:----:|-------
 [`arm64e-apple-ios`](platform-support/arm64e-apple-ios.md) | ✓ | | ARM64e Apple iOS
 [`arm64e-apple-darwin`](platform-support/arm64e-apple-darwin.md)  | ✓ | ✓ | ARM64e Apple Darwin
-[`arm64ec-pc-windows-msvc`](platform-support/arm64ec-pc-windows-msvc.md) | ? | | Arm64EC Windows MSVC
 [`aarch64-apple-ios-macabi`](platform-support/apple-ios-macabi.md) | ✓ |  | Apple Catalyst on ARM64
 [`aarch64-apple-tvos`](platform-support/apple-tvos.md) | ✓ |  | ARM64 tvOS
 [`aarch64-apple-tvos-sim`](platform-support/apple-tvos.md) | ✓ |  | ARM64 tvOS Simulator
diff --git a/src/doc/rustc/src/platform-support/arm64ec-pc-windows-msvc.md b/src/doc/rustc/src/platform-support/arm64ec-pc-windows-msvc.md
index 2e827535862..dcabd21a83e 100644
--- a/src/doc/rustc/src/platform-support/arm64ec-pc-windows-msvc.md
+++ b/src/doc/rustc/src/platform-support/arm64ec-pc-windows-msvc.md
@@ -1,6 +1,6 @@
 # `arm64ec-pc-windows-msvc`
 
-**Tier: 3**
+**Tier: 2**
 
 Arm64EC ("Emulation Compatible") for mixed architecture (AArch64 and x86_64)
 applications on AArch64 Windows 11. See <https://learn.microsoft.com/en-us/windows/arm/arm64ec>.
@@ -21,6 +21,9 @@ Only supported backend is LLVM 18 or above:
 * 18.1.4 fixed linking issue for some intrinsics implemented in
   `compiler_builtins`.
 
+Visual Studio 2022 (or above) with the "ARM64/ARM64EC built tools" component and
+the Windows 11 SDK are required.
+
 ### Reusing code from other architectures - x86_64 or AArch64?
 
 Arm64EC uses `arm64ec` as its `target_arch`, but it is possible to reuse
@@ -62,10 +65,8 @@ target = [ "arm64ec-pc-windows-msvc" ]
 
 ## Building Rust programs
 
-Rust does not yet ship pre-compiled artifacts for this target. To compile for
-this target, you will either need to build Rust with the target enabled (see
-"Building the target" above), or build your own copy using `build-std` or
-similar.
+These targets are distributed through `rustup`, and otherwise require no
+special configuration.
 
 ## Testing
 
diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs
index bed76263b45..9f33e431274 100644
--- a/src/tools/build-manifest/src/main.rs
+++ b/src/tools/build-manifest/src/main.rs
@@ -71,6 +71,7 @@ static TARGETS: &[&str] = &[
     "arm-unknown-linux-gnueabihf",
     "arm-unknown-linux-musleabi",
     "arm-unknown-linux-musleabihf",
+    "arm64ec-pc-windows-msvc",
     "armv5te-unknown-linux-gnueabi",
     "armv5te-unknown-linux-musleabi",
     "armv7-linux-androideabi",
diff --git a/src/tools/miri/tests/fail/dyn-call-trait-mismatch.rs b/src/tools/miri/tests/fail/dyn-call-trait-mismatch.rs
index f71df9a1c90..982d57b7372 100644
--- a/src/tools/miri/tests/fail/dyn-call-trait-mismatch.rs
+++ b/src/tools/miri/tests/fail/dyn-call-trait-mismatch.rs
@@ -1,5 +1,5 @@
-// Validation stops this too early.
-//@compile-flags: -Zmiri-disable-validation
+// Validation and SB stop this too early.
+//@compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows
 
 trait T1 {
     #[allow(dead_code)]
diff --git a/src/tools/miri/tests/pass/issues/issue-miri-3541-dyn-vtable-trait-normalization.rs b/src/tools/miri/tests/pass/issues/issue-miri-3541-dyn-vtable-trait-normalization.rs
new file mode 100644
index 00000000000..c46031de2d8
--- /dev/null
+++ b/src/tools/miri/tests/pass/issues/issue-miri-3541-dyn-vtable-trait-normalization.rs
@@ -0,0 +1,40 @@
+#![feature(ptr_metadata)]
+// This test is the result of minimizing the `emplacable` crate to reproduce
+// <https://github.com/rust-lang/miri/issues/3541>.
+
+use std::{ops::FnMut, ptr::Pointee};
+
+pub type EmplacerFn<'a, T> = dyn for<'b> FnMut(<T as Pointee>::Metadata) + 'a;
+
+#[repr(transparent)]
+pub struct Emplacer<'a, T>(EmplacerFn<'a, T>)
+where
+    T: ?Sized;
+
+impl<'a, T> Emplacer<'a, T>
+where
+    T: ?Sized,
+{
+    pub unsafe fn from_fn<'b>(emplacer_fn: &'b mut EmplacerFn<'a, T>) -> &'b mut Self {
+        // This used to trigger:
+        // constructing invalid value: wrong trait in wide pointer vtable: expected
+        // `std::ops::FnMut(<[std::boxed::Box<i32>] as std::ptr::Pointee>::Metadata)`, but encountered
+        // `std::ops::FnMut<(usize,)>`.
+        unsafe { &mut *((emplacer_fn as *mut EmplacerFn<'a, T>) as *mut Self) }
+    }
+}
+
+pub fn box_new_with<T>()
+where
+    T: ?Sized,
+{
+    let emplacer_closure = &mut |_meta| {
+        unreachable!();
+    };
+
+    unsafe { Emplacer::<T>::from_fn(emplacer_closure) };
+}
+
+fn main() {
+    box_new_with::<[Box<i32>]>();
+}
diff --git a/src/tools/rustc-perf b/src/tools/rustc-perf
-Subproject 72daa50ce2350f5a9b5ae6dc3ad6babccd14ec0
+Subproject c64bb60dd1636922b1ccbb82867bed934a99dbc