Skip to content

Commit

Permalink
panic-semihosting, panic-itm: Move #![no_std] above #![cfg(...)]
Browse files Browse the repository at this point in the history
... so that the crates are always `no_std`, even on unsupported platforms.
  • Loading branch information
zachs18 committed May 1, 2024
1 parent 4395bae commit c122364
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion panic-itm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
//! panicked at 'FOO', src/main.rs:6:5
//! ```

#![no_std]
#![cfg(any(all(target_arch = "arm", target_os = "none"), doc))]
#![deny(missing_docs)]
#![deny(warnings)]
#![no_std]

extern crate cortex_m;

Expand Down
2 changes: 1 addition & 1 deletion panic-semihosting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
//! We discourage using this feature when the program will run on hardware as the exit call can
//! leave the hardware debugger in an inconsistent state.

#![no_std]
#![cfg(all(target_arch = "arm", target_os = "none"))]
#![deny(missing_docs)]
#![deny(warnings)]
#![no_std]

extern crate cortex_m;
extern crate cortex_m_semihosting as sh;
Expand Down

0 comments on commit c122364

Please sign in to comment.