Skip to content

Commit 8a6e2c6

Browse files
committed
Fix namespace for asm! macro
This commit removes the feature attribute asm and add a namespace for the usage of the asm macro. Currently the following build error is generated when using rustc 1.66.0-nightly (c0983a9aa 2022-10-12): $ cargo b Compiling drogue-boot v0.1.2 (/iot/drogue/drogue-boot) error: cannot find macro `asm` in this scope --> src/lib.rs:100:9 | 100 | asm! { | ^^^ | = note: consider importing this macro: core::arch::asm warning: the feature `asm` has been stable since 1.59.0 and no longer requires an attribute to enable --> src/lib.rs:4:12 | 4 | #![feature(asm)] | ^^^ | = note: `#[warn(stable_features)]` on by default warning: `drogue-boot` (lib) generated 1 warning error: could not compile `drogue-boot` due to previous error; 1 warning emitted Refs: rust-lang/rust#84019 Signed-off-by: Daniel Bevenius <[email protected]>
1 parent e9782fe commit 8a6e2c6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Licensed under the Apache-License 2.0
22

33
#![no_std]
4-
#![feature(asm)]
54

65
#[cfg(feature = "rtt")]
76
pub mod rtt_logger;
@@ -97,7 +96,7 @@ extern "C" fn do_jump(_sp: u32, _reset: u32) -> ! {
9796
// r1 = reset
9897

9998
unsafe {
100-
asm! {
99+
core::arch::asm! {
101100
// Set the stack-pointer
102101
"msr msp, r0",
103102
// Branch to the reset handler.

0 commit comments

Comments
 (0)