Skip to content

Commit

Permalink
Fix or disable some lints
Browse files Browse the repository at this point in the history
  • Loading branch information
jannic committed Oct 18, 2024
1 parent 6e4e31f commit 9882d5e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions cortex-m-rt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,7 @@ pub fn heap_start() -> *mut u32 {
static mut __sheap: u32;
}

#[allow(unused_unsafe)] // no longer unsafe since rust 1.82.0
unsafe { core::ptr::addr_of_mut!(__sheap) }
}

Expand Down
5 changes: 5 additions & 0 deletions cortex-m-semihosting/src/export.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
//! IMPLEMENTATION DETAILS USED BY MACROS

// This must be replaced by a different solution before rust edition 2024
// https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html
#![allow(static_mut_refs)]

use core::fmt::{self, Write};

use crate::hio::{self, HostStream};


static mut HSTDOUT: Option<HostStream> = None;

pub fn hstdout_str(s: &str) {
Expand Down
2 changes: 1 addition & 1 deletion cortex-m/src/itm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ unsafe fn write_aligned_impl(port: &mut Stim, buffer: &[u8]) {

struct Port<'p>(&'p mut Stim);

impl<'p> fmt::Write for Port<'p> {
impl fmt::Write for Port<'_> {
#[inline]
fn write_str(&mut self, s: &str) -> fmt::Result {
write_all(self.0, s.as_bytes());
Expand Down

0 comments on commit 9882d5e

Please sign in to comment.