Skip to content

Commit 6f1f392

Browse files
authored
Merge pull request #4576 from rust-lang/rustup-2025-09-11
Automatic Rustup
2 parents 891fbf7 + 9ead6d5 commit 6f1f392

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a09fbe2c8372643a27a8082236120f95ed4e6bba
1+
f4665ab8368ad2e8a86d4390ae35c28bdd9561bb

tests/pass/static_align.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#![feature(static_align)]
2+
3+
// When a static uses `align(N)`, its address should be a multiple of `N`.
4+
5+
#[rustc_align_static(256)]
6+
static FOO: u64 = 0;
7+
8+
#[rustc_align_static(512)]
9+
static BAR: u64 = 0;
10+
11+
fn main() {
12+
assert!(core::ptr::from_ref(&FOO).addr().is_multiple_of(256));
13+
assert!(core::ptr::from_ref(&BAR).addr().is_multiple_of(512));
14+
}

0 commit comments

Comments
 (0)