From 2e0fdc5c7fc2e054d3217452961953347493e7ca Mon Sep 17 00:00:00 2001 From: "Eddy (Eduard) Stefes" Date: Fri, 27 Feb 2026 11:48:00 +0100 Subject: [PATCH] disable the fragment_in_final test on s390x on s390x 128bit types have a smaller alignment then on x86[^1]. This leads to the tests falling due to different errors emitted. As this affects the same infrastructure as #149056 lets also for now disable the tests on s390x. [^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi --- tests/ui/consts/const-eval/ptr_fragments_in_final.rs | 1 + tests/ui/consts/const-eval/ptr_fragments_in_final.stderr | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/ui/consts/const-eval/ptr_fragments_in_final.rs b/tests/ui/consts/const-eval/ptr_fragments_in_final.rs index 76f292c3f8b52..7af6a6a9079c4 100644 --- a/tests/ui/consts/const-eval/ptr_fragments_in_final.rs +++ b/tests/ui/consts/const-eval/ptr_fragments_in_final.rs @@ -1,4 +1,5 @@ //! Test that we properly error when there is a pointer fragment in the final value. +//@ ignore-s390x different alignment on s390x make the test fail use std::{mem::{self, MaybeUninit}, ptr}; diff --git a/tests/ui/consts/const-eval/ptr_fragments_in_final.stderr b/tests/ui/consts/const-eval/ptr_fragments_in_final.stderr index de0cd4db7e155..818a559d4e47e 100644 --- a/tests/ui/consts/const-eval/ptr_fragments_in_final.stderr +++ b/tests/ui/consts/const-eval/ptr_fragments_in_final.stderr @@ -1,5 +1,5 @@ error: encountered partial pointer in final value of constant - --> $DIR/ptr_fragments_in_final.rs:15:1 + --> $DIR/ptr_fragments_in_final.rs:16:1 | LL | const MEMCPY_RET: MaybeUninit<*const i32> = unsafe { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | const MEMCPY_RET: MaybeUninit<*const i32> = unsafe { = note: while pointers can be broken apart into individual bytes during const-evaluation, only complete pointers (with all their bytes in the right order) are supported in the final value error: encountered partial pointer in final value of constant - --> $DIR/ptr_fragments_in_final.rs:24:1 + --> $DIR/ptr_fragments_in_final.rs:25:1 | LL | const MIXED_PTR: MaybeUninit<*const u8> = { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -15,7 +15,7 @@ LL | const MIXED_PTR: MaybeUninit<*const u8> = { = note: while pointers can be broken apart into individual bytes during const-evaluation, only complete pointers (with all their bytes in the right order) are supported in the final value error: encountered partial pointer in final value of constant - --> $DIR/ptr_fragments_in_final.rs:61:5 + --> $DIR/ptr_fragments_in_final.rs:62:5 | LL | const A: Thing = unsafe { | ^^^^^^^^^^^^^^