diff options
| author | bors <bors@rust-lang.org> | 2025-06-19 03:27:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-06-19 03:27:53 +0000 |
| commit | 8a65ee08296b36342bf7c3cdc15312ccbc357227 (patch) | |
| tree | dd41afef08338c59067cd819c05f4a571ad2f36b /tests/codegen | |
| parent | d1d8e386c5e84c4ba857f56c3291f73c27e2d62a (diff) | |
| parent | 986f8cd709f9a9a6ac8888e4f1fe5eaf3dbfdefd (diff) | |
| download | rust-8a65ee08296b36342bf7c3cdc15312ccbc357227.tar.gz rust-8a65ee08296b36342bf7c3cdc15312ccbc357227.zip | |
Auto merge of #142697 - tgross35:rollup-xu4yuq6, r=tgross35
Rollup of 7 pull requests Successful merges: - rust-lang/rust#140247 (Don't build `ParamEnv` and do trait solving in `ItemCtxt`s when lowering IATs) - rust-lang/rust#142507 (use `#[align]` attribute for `fn_align`) - rust-lang/rust#142524 (Weekly `cargo update`) - rust-lang/rust#142606 (AsyncDrop trait without sync Drop generates an error) - rust-lang/rust#142639 (Add a missing colon at the end of the panic location details in location-detail-unwrap-multiline.rs) - rust-lang/rust#142654 (library: Increase timeout on mpmc test to reduce flakes) - rust-lang/rust#142692 (Assorted bootstrap cleanups (step 3)) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/align-fn.rs | 22 | ||||
| -rw-r--r-- | tests/codegen/min-function-alignment.rs | 6 | ||||
| -rw-r--r-- | tests/codegen/naked-fn/aligned.rs | 2 | ||||
| -rw-r--r-- | tests/codegen/naked-fn/min-function-alignment.rs | 4 |
4 files changed, 18 insertions, 16 deletions
diff --git a/tests/codegen/align-fn.rs b/tests/codegen/align-fn.rs index 660d8cd2bbf..267da060240 100644 --- a/tests/codegen/align-fn.rs +++ b/tests/codegen/align-fn.rs @@ -5,7 +5,7 @@ // CHECK: align 16 #[no_mangle] -#[repr(align(16))] +#[align(16)] pub fn fn_align() {} pub struct A; @@ -13,12 +13,12 @@ pub struct A; impl A { // CHECK: align 16 #[no_mangle] - #[repr(align(16))] + #[align(16)] pub fn method_align(self) {} // CHECK: align 16 #[no_mangle] - #[repr(align(16))] + #[align(16)] pub fn associated_fn() {} } @@ -26,19 +26,19 @@ trait T: Sized { fn trait_fn() {} // CHECK: align 32 - #[repr(align(32))] + #[align(32)] fn trait_method(self) {} } impl T for A { // CHECK: align 16 #[no_mangle] - #[repr(align(16))] + #[align(16)] fn trait_fn() {} // CHECK: align 16 #[no_mangle] - #[repr(align(16))] + #[align(16)] fn trait_method(self) {} } @@ -51,18 +51,20 @@ pub fn foo() { // CHECK-LABEL: align_specified_twice_1 // CHECK-SAME: align 64 #[no_mangle] -#[repr(align(32), align(64))] +#[align(32)] +#[align(64)] pub fn align_specified_twice_1() {} // CHECK-LABEL: align_specified_twice_2 // CHECK-SAME: align 128 #[no_mangle] -#[repr(align(128), align(32))] +#[align(128)] +#[align(32)] pub fn align_specified_twice_2() {} // CHECK-LABEL: align_specified_twice_3 // CHECK-SAME: align 256 #[no_mangle] -#[repr(align(32))] -#[repr(align(256))] +#[align(32)] +#[align(256)] pub fn align_specified_twice_3() {} 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 diff --git a/tests/codegen/naked-fn/aligned.rs b/tests/codegen/naked-fn/aligned.rs index 47ef779f1b2..f9fce8e5a5d 100644 --- a/tests/codegen/naked-fn/aligned.rs +++ b/tests/codegen/naked-fn/aligned.rs @@ -8,7 +8,7 @@ use std::arch::naked_asm; // CHECK: .balign 16 // CHECK-LABEL: naked_empty: -#[repr(align(16))] +#[align(16)] #[no_mangle] #[unsafe(naked)] pub extern "C" fn naked_empty() { diff --git a/tests/codegen/naked-fn/min-function-alignment.rs b/tests/codegen/naked-fn/min-function-alignment.rs index 1d778be8c90..59554c1cae5 100644 --- a/tests/codegen/naked-fn/min-function-alignment.rs +++ b/tests/codegen/naked-fn/min-function-alignment.rs @@ -16,7 +16,7 @@ pub extern "C" fn naked_no_explicit_align() { // CHECK: .balign 16 #[no_mangle] -#[repr(align(8))] +#[align(8)] #[unsafe(naked)] pub extern "C" fn naked_lower_align() { core::arch::naked_asm!("ret") @@ -24,7 +24,7 @@ pub extern "C" fn naked_lower_align() { // CHECK: .balign 32 #[no_mangle] -#[repr(align(32))] +#[align(32)] #[unsafe(naked)] pub extern "C" fn naked_higher_align() { core::arch::naked_asm!("ret") |
