diff options
| author | David Wood <david.wood2@arm.com> | 2025-01-22 18:07:04 +0000 |
|---|---|---|
| committer | David Wood <david.wood2@arm.com> | 2025-06-16 23:04:35 +0000 |
| commit | 3c3ba37ba57b66ccced0d9c41e1f0c0f48868a20 (patch) | |
| tree | 2af4a2d2ca0dd1725dd0b1285c184a31eb56f470 /tests/codegen | |
| parent | 118d4e62c380a4dfb7a0c53a0001a19d0cee6567 (diff) | |
| download | rust-3c3ba37ba57b66ccced0d9c41e1f0c0f48868a20.tar.gz rust-3c3ba37ba57b66ccced0d9c41e1f0c0f48868a20.zip | |
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.
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/dst-offset.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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<T: ?Sized> { +struct Dst<T: PointeeSized> { x: u32, y: u8, z: T, |
