diff options
| author | Zachary S <zasample18+github@gmail.com> | 2025-07-30 15:35:19 -0500 |
|---|---|---|
| committer | Zachary S <zasample18+github@gmail.com> | 2025-07-31 12:50:40 -0500 |
| commit | f554c79ef819cbc0f9983d0d5306cd7a9bfea6d8 (patch) | |
| tree | c3b8c646fb17083c7b8149dbeec9f3b002289520 /src | |
| parent | 3fb1b53a9dbfcdf37a4b67d35cde373316829930 (diff) | |
Do not give function allocations alignment in consteval or miri.
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/miri/tests/pass/fn_align.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/tools/miri/tests/pass/fn_align.rs b/src/tools/miri/tests/pass/fn_align.rs deleted file mode 100644 index 9752d033458..00000000000 --- a/src/tools/miri/tests/pass/fn_align.rs +++ /dev/null @@ -1,25 +0,0 @@ -//@compile-flags: -Zmin-function-alignment=8 - -// FIXME(rust-lang/rust#82232, rust-lang/rust#143834): temporarily renamed to mitigate `#[align]` -// nameres ambiguity -#![feature(rustc_attrs)] -#![feature(fn_align)] - -// When a function uses `align(N)`, the function address should be a multiple of `N`. - -#[rustc_align(256)] -fn foo() {} - -#[rustc_align(16)] -fn bar() {} - -#[rustc_align(4)] -fn baz() {} - -fn main() { - assert!((foo as usize).is_multiple_of(256)); - assert!((bar as usize).is_multiple_of(16)); - - // The maximum of `align(N)` and `-Zmin-function-alignment=N` is used. - assert!((baz as usize).is_multiple_of(8)); -} |
