Skip to content

Commit 2499d14

Browse files
committed
Bump asm to edition 2024.
1 parent 872ad7e commit 2499d14

17 files changed

Lines changed: 174 additions & 147 deletions

cortex-m/asm/inline.rs

Lines changed: 169 additions & 143 deletions
Large diffs are not rendered by default.

cortex-m/asm/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ macro_rules! shims {
4141
$( fn $name:ident( $($arg:ident: $argty:ty),* ) $(-> $ret:ty)?; )+
4242
) => {
4343
$(
44-
#[no_mangle]
44+
#[unsafe(no_mangle)]
4545
pub unsafe extern "C" fn $name(
4646
$($arg: $argty),*
4747
) $(-> $ret)? {
48-
crate::inline::$name($($arg),*)
48+
unsafe { crate::inline::$name($($arg),*) }
4949
}
5050
)+
5151
};
@@ -126,9 +126,9 @@ shims! {
126126
/// handler gets linked in, this causes a linker error. We always build this file with optimizations
127127
/// enabled, but even without them the panic handler should never be linked in.
128128
#[panic_handler]
129-
#[link_section = ".text.asm_panic_handler"]
129+
#[unsafe(link_section = ".text.asm_panic_handler")]
130130
fn panic(_: &core::panic::PanicInfo) -> ! {
131-
extern "C" {
131+
unsafe extern "C" {
132132
#[link_name = "cortex-m internal error: panic handler not optimized out, please file an \
133133
issue at https://github.com/rust-embedded/cortex-m"]
134134
fn __cortex_m_should_not_panic() -> !;
0 Bytes
Binary file not shown.

cortex-m/bin/thumbv6m-none-eabi.a

-28 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

cortex-m/bin/thumbv7em-none-eabi.a

8 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-24 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

cortex-m/bin/thumbv7m-none-eabi.a

40 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)