diff options
| author | Folkert de Vries <folkert@folkertdev.nl> | 2025-06-09 20:08:52 +0200 |
|---|---|---|
| committer | Folkert de Vries <folkert@folkertdev.nl> | 2025-06-18 12:37:08 +0200 |
| commit | 1fdf2b562070ec98c5b32ee67b8c6d8145127a6e (patch) | |
| tree | b03e6e19001df8984537f2843f246c8453c1bcf6 /src | |
| parent | 1bb335244c311a07cee165c28c553c869e6f64a9 (diff) | |
| download | rust-1fdf2b562070ec98c5b32ee67b8c6d8145127a6e.tar.gz rust-1fdf2b562070ec98c5b32ee67b8c6d8145127a6e.zip | |
add `#[align]` attribute
Right now it's used for functions with `fn_align`, in the future it will get more uses (statics, struct fields, etc.)
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/miri/tests/pass/fn_align.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/miri/tests/pass/fn_align.rs b/src/tools/miri/tests/pass/fn_align.rs index 550bb1cb4d7..28f92995880 100644 --- a/src/tools/miri/tests/pass/fn_align.rs +++ b/src/tools/miri/tests/pass/fn_align.rs @@ -1,21 +1,21 @@ //@compile-flags: -Zmin-function-alignment=8 #![feature(fn_align)] -// When a function uses `repr(align(N))`, the function address should be a multiple of `N`. +// When a function uses `align(N)`, the function address should be a multiple of `N`. -#[repr(align(256))] +#[align(256)] fn foo() {} -#[repr(align(16))] +#[align(16)] fn bar() {} -#[repr(align(4))] +#[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 `repr(align(N))` and `-Zmin-function-alignment=N` is used. + // The maximum of `align(N)` and `-Zmin-function-alignment=N` is used. assert!((baz as usize).is_multiple_of(8)); } |
