Skip to content

Commit b9befb5

Browse files
authored
Merge pull request #2351 from rust-lang/rustc-pull
2 parents cd857aa + 7ad1e54 commit b9befb5

File tree

4 files changed

+23
-3
lines changed

4 files changed

+23
-3
lines changed

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![feature(rustc_private)]
22
#![feature(cfg_match)]
3-
#![feature(cell_update)]
43
#![feature(float_gamma)]
54
#![feature(float_erf)]
65
#![feature(map_try_insert)]

tests/fail/panic/tls_macro_const_drop_panic.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
thread $NAME panicked at tests/fail/panic/tls_macro_const_drop_panic.rs:LL:CC:
33
ow
4-
fatal runtime error: thread local panicked on drop
4+
fatal runtime error: thread local panicked on drop, aborting
55
error: abnormal termination: the program aborted execution
66

77
error: aborting due to 1 previous error

tests/fail/panic/tls_macro_drop_panic.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
thread $NAME panicked at tests/fail/panic/tls_macro_drop_panic.rs:LL:CC:
33
ow
4-
fatal runtime error: thread local panicked on drop
4+
fatal runtime error: thread local panicked on drop, aborting
55
error: abnormal termination: the program aborted execution
66

77
error: aborting due to 1 previous error

tests/pass/fn_align.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//@compile-flags: -Zmin-function-alignment=8
2+
#![feature(fn_align)]
3+
4+
// When a function uses `repr(align(N))`, the function address should be a multiple of `N`.
5+
6+
#[repr(align(256))]
7+
fn foo() {}
8+
9+
#[repr(align(16))]
10+
fn bar() {}
11+
12+
#[repr(align(4))]
13+
fn baz() {}
14+
15+
fn main() {
16+
assert!((foo as usize).is_multiple_of(256));
17+
assert!((bar as usize).is_multiple_of(16));
18+
19+
// The maximum of `repr(align(N))` and `-Zmin-function-alignment=N` is used.
20+
assert!((baz as usize).is_multiple_of(8));
21+
}

0 commit comments

Comments
 (0)