about summary refs log tree commit diff
path: root/tests/codegen/min-function-alignment.rs
diff options
context:
space:
mode:
authorTrevor Gross <t.gross35@gmail.com>2025-06-18 20:22:49 -0400
committerGitHub <noreply@github.com>2025-06-18 20:22:49 -0400
commit07932ad11153b62ec2138fa71a398a1ca8ea05ac (patch)
tree289f0c510ce9d472d6c5e29424f3174fe7ac71b9 /tests/codegen/min-function-alignment.rs
parentcff8e9ae142c3dcaf4c66ec5b6be932f1442c4b5 (diff)
parent1fdf2b562070ec98c5b32ee67b8c6d8145127a6e (diff)
downloadrust-07932ad11153b62ec2138fa71a398a1ca8ea05ac.tar.gz
rust-07932ad11153b62ec2138fa71a398a1ca8ea05ac.zip
Rollup merge of #142507 - folkertdev:fn-align-align-attribute, r=jdonszelmann
use `#[align]` attribute for `fn_align`

Tracking issue: https://github.com/rust-lang/rust/issues/82232

https://github.com/rust-lang/rfcs/pull/3806 decides to add the `#[align]` attribute for alignment of various items. Right now it's used for functions with `fn_align`, in the future it will get more uses (statics, struct fields, etc.)

(the RFC finishes FCP today)

r? `@ghost`
Diffstat (limited to 'tests/codegen/min-function-alignment.rs')
-rw-r--r--tests/codegen/min-function-alignment.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/codegen/min-function-alignment.rs b/tests/codegen/min-function-alignment.rs
index 7c0ad12402a..75f845572a4 100644
--- a/tests/codegen/min-function-alignment.rs
+++ b/tests/codegen/min-function-alignment.rs
@@ -18,16 +18,16 @@ pub fn no_explicit_align() {}
 // align16: align 16
 // align1024: align 1024
 #[no_mangle]
-#[repr(align(8))]
+#[align(8)]
 pub fn lower_align() {}
 
-// the higher value of min-function-alignment and repr(align) wins out
+// the higher value of min-function-alignment and the align attribute wins out
 //
 // CHECK-LABEL: @higher_align
 // align16: align 32
 // align1024: align 1024
 #[no_mangle]
-#[repr(align(32))]
+#[align(32)]
 pub fn higher_align() {}
 
 // cold functions follow the same rules as other functions