Skip to content

Commit b5b158c

Browse files
committed
Migrate testcrate and panic-handler to edition 2024
1 parent 56cfe97 commit b5b158c

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

crates/panic-handler/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "panic-handler"
33
version = "0.1.0"
44
authors = ["Alex Crichton <[email protected]>"]
5-
edition = "2021"
5+
edition = "2024"
66
publish = false
77

88
[dependencies]

testcrate/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "testcrate"
33
version = "0.1.0"
44
authors = ["Alex Crichton <[email protected]>"]
5-
edition = "2021"
5+
edition = "2024"
66
publish = false
77

88
[lib]

testcrate/src/bench.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ pub fn skip_asm_checks(_test_name: &str) -> bool {
8989

9090
/// Create a comparison of the system symbol, compiler_builtins, and optionally handwritten
9191
/// assembly.
92+
///
93+
/// # Safety
94+
///
95+
/// The signature must be correct and any assembly must be sound.
9296
#[macro_export]
9397
macro_rules! float_bench {
9498
(
@@ -120,8 +124,9 @@ macro_rules! float_bench {
120124
]
121125
$(,)?
122126
) => {paste::paste! {
127+
// SAFETY: macro invocation must use the correct signature
123128
#[cfg($sys_available)]
124-
extern "C" {
129+
unsafe extern "C" {
125130
/// Binding for the system function
126131
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
127132
fn $sys_fn($($arg: $arg_ty),*) -> $ret_ty;

0 commit comments

Comments
 (0)