Skip to content

Commit 9d07e3f

Browse files
committed
Fix or disable some lints
1 parent 6e4e31f commit 9d07e3f

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

cortex-m-rt/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,10 @@ pub fn heap_start() -> *mut u32 {
10791079
static mut __sheap: u32;
10801080
}
10811081

1082-
unsafe { core::ptr::addr_of_mut!(__sheap) }
1082+
#[allow(unused_unsafe)] // no longer unsafe since rust 1.82.0
1083+
unsafe {
1084+
core::ptr::addr_of_mut!(__sheap)
1085+
}
10831086
}
10841087

10851088
// Entry point is Reset.

cortex-m-semihosting/src/export.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
//! IMPLEMENTATION DETAILS USED BY MACROS
22
3+
// This must be replaced by a different solution before rust edition 2024
4+
// https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html
5+
#![allow(static_mut_refs)]
6+
37
use core::fmt::{self, Write};
48

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

cortex-m/src/itm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ unsafe fn write_aligned_impl(port: &mut Stim, buffer: &[u8]) {
5757

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

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

0 commit comments

Comments
 (0)