From 17d40c6057c88f4c432b0d7bac88e1b84cb7e67f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:03:36 +0200 Subject: Adding upstream version 1.65.0+dfsg1. Signed-off-by: Daniel Baumann --- .../unions/repr/should_handle_align.rs | 11 ++++-- .../unions/repr/should_handle_packed.rs | 11 ++++-- .../repr/should_require_well_defined_layout.rs | 11 ++++-- .../repr/should_require_well_defined_layout.stderr | 42 ++++++++++++++-------- 4 files changed, 55 insertions(+), 20 deletions(-) (limited to 'src/test/ui/transmutability/unions/repr') diff --git a/src/test/ui/transmutability/unions/repr/should_handle_align.rs b/src/test/ui/transmutability/unions/repr/should_handle_align.rs index e215799a2..09c13cc4d 100644 --- a/src/test/ui/transmutability/unions/repr/should_handle_align.rs +++ b/src/test/ui/transmutability/unions/repr/should_handle_align.rs @@ -6,12 +6,19 @@ #![allow(dead_code, incomplete_features, non_camel_case_types)] mod assert { - use std::mem::BikeshedIntrinsicFrom; + use std::mem::{Assume, BikeshedIntrinsicFrom}; pub struct Context; pub fn is_maybe_transmutable() where - Dst: BikeshedIntrinsicFrom + Dst: BikeshedIntrinsicFrom {} } diff --git a/src/test/ui/transmutability/unions/repr/should_handle_packed.rs b/src/test/ui/transmutability/unions/repr/should_handle_packed.rs index 34a53c7a8..24c2abd69 100644 --- a/src/test/ui/transmutability/unions/repr/should_handle_packed.rs +++ b/src/test/ui/transmutability/unions/repr/should_handle_packed.rs @@ -6,12 +6,19 @@ #![allow(dead_code, incomplete_features, non_camel_case_types)] mod assert { - use std::mem::BikeshedIntrinsicFrom; + use std::mem::{Assume, BikeshedIntrinsicFrom}; pub struct Context; pub fn is_maybe_transmutable() where - Dst: BikeshedIntrinsicFrom + Dst: BikeshedIntrinsicFrom {} } diff --git a/src/test/ui/transmutability/unions/repr/should_require_well_defined_layout.rs b/src/test/ui/transmutability/unions/repr/should_require_well_defined_layout.rs index cec8e389f..b1d5f71dc 100644 --- a/src/test/ui/transmutability/unions/repr/should_require_well_defined_layout.rs +++ b/src/test/ui/transmutability/unions/repr/should_require_well_defined_layout.rs @@ -5,12 +5,19 @@ #![allow(dead_code, incomplete_features, non_camel_case_types)] mod assert { - use std::mem::BikeshedIntrinsicFrom; + use std::mem::{Assume, BikeshedIntrinsicFrom}; pub struct Context; pub fn is_maybe_transmutable() where - Dst: BikeshedIntrinsicFrom + Dst: BikeshedIntrinsicFrom {} } diff --git a/src/test/ui/transmutability/unions/repr/should_require_well_defined_layout.stderr b/src/test/ui/transmutability/unions/repr/should_require_well_defined_layout.stderr index 2ed01b159..523bde85a 100644 --- a/src/test/ui/transmutability/unions/repr/should_require_well_defined_layout.stderr +++ b/src/test/ui/transmutability/unions/repr/should_require_well_defined_layout.stderr @@ -1,34 +1,48 @@ error[E0277]: `should_reject_repr_rust::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. - --> $DIR/should_require_well_defined_layout.rs:23:48 + --> $DIR/should_require_well_defined_layout.rs:30:48 | LL | assert::is_maybe_transmutable::(); | ^^ `should_reject_repr_rust::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | - = help: the trait `BikeshedIntrinsicFrom` is not implemented for `()` + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | -LL | pub fn is_maybe_transmutable() - | --------------------- required by a bound in this -LL | where -LL | Dst: BikeshedIntrinsicFrom - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` +LL | pub fn is_maybe_transmutable() + | --------------------- required by a bound in this +LL | where +LL | Dst: BikeshedIntrinsicFrom + | |__________^ required by this bound in `is_maybe_transmutable` error[E0277]: `u128` cannot be safely transmuted into `should_reject_repr_rust::repr_rust` in the defining scope of `assert::Context`. - --> $DIR/should_require_well_defined_layout.rs:24:43 + --> $DIR/should_require_well_defined_layout.rs:31:43 | LL | assert::is_maybe_transmutable::(); | ^^^^^^^^^ `u128` cannot be safely transmuted into `should_reject_repr_rust::repr_rust` in the defining scope of `assert::Context`. | - = help: the trait `BikeshedIntrinsicFrom` is not implemented for `should_reject_repr_rust::repr_rust` + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `should_reject_repr_rust::repr_rust` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | -LL | pub fn is_maybe_transmutable() - | --------------------- required by a bound in this -LL | where -LL | Dst: BikeshedIntrinsicFrom - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` +LL | pub fn is_maybe_transmutable() + | --------------------- required by a bound in this +LL | where +LL | Dst: BikeshedIntrinsicFrom + | |__________^ required by this bound in `is_maybe_transmutable` error: aborting due to 2 previous errors -- cgit v1.2.3