From 3c3ba37ba57b66ccced0d9c41e1f0c0f48868a20 Mon Sep 17 00:00:00 2001 From: David Wood Date: Wed, 22 Jan 2025 18:07:04 +0000 Subject: tests: `PointeeSized` bounds with extern types These tests necessarily need to change now that `?Sized` is not sufficient to accept extern types and `PointeeSized` is now necessary. In addition, the `size_of_val`/`align_of_val` test can now be changed to expect an error. --- tests/codegen/dst-offset.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/codegen') diff --git a/tests/codegen/dst-offset.rs b/tests/codegen/dst-offset.rs index 7177a960432..2cf5fa9fac6 100644 --- a/tests/codegen/dst-offset.rs +++ b/tests/codegen/dst-offset.rs @@ -3,8 +3,9 @@ //@ compile-flags: -C no-prepopulate-passes -Copt-level=0 #![crate_type = "lib"] -#![feature(extern_types)] +#![feature(extern_types, sized_hierarchy)] +use std::marker::PointeeSized; use std::ptr::addr_of; // Hack to get the correct type for usize @@ -12,7 +13,7 @@ use std::ptr::addr_of; #[no_mangle] pub fn helper(_: usize) {} -struct Dst { +struct Dst { x: u32, y: u8, z: T, -- cgit 1.4.1-3-g733a5