Skip to content

Commit df7e5a0

Browse files
committed
fixes to code for new toolchain
1 parent 0a5bece commit df7e5a0

File tree

9 files changed

+15
-8
lines changed

9 files changed

+15
-8
lines changed

drv/lpc55-romapi/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// License, v. 2.0. If a copy of the MPL was not distributed with this
33
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
44

5-
#![feature(asm)]
65
#![feature(naked_functions)]
76
#![no_std]
87

drv/lpc55-spi-server/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ fn muck_with_gpios(syscon: &Syscon) {
216216
];
217217

218218
for (pin, alt, mode, slew, invert, digi, od) in
219-
core::array::IntoIter::new(pin_settings)
219+
IntoIterator::into_iter(pin_settings)
220220
{
221221
iocon
222222
.iocon_configure(pin, alt, mode, slew, invert, digi, od)

drv/stm32xx-sys/src/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ where
6161
S: pac::RegisterSpec<Ux = u32> + pac::Readable + pac::Writable,
6262
{
6363
unsafe fn set_bit(&self, index: u8) {
64-
self.modify(|r, w| unsafe { w.bits(r.bits() | 1 << index) });
64+
self.modify(|r, w| w.bits(r.bits() | 1 << index));
6565
}
6666

6767
unsafe fn clear_bit(&self, index: u8) {
68-
self.modify(|r, w| unsafe { w.bits(r.bits() & !(1 << index)) });
68+
self.modify(|r, w| w.bits(r.bits() & !(1 << index)));
6969
}
7070
}
7171

stage0/src/hypo.rs

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
77
use lpc55_romapi::FlashStatus;
88

9+
use core::arch::asm;
10+
911
// FlashStatus is represented as a u32 so it's safe to return directly.
1012
// We convert on the receiving end for safety
1113
// #[cmse_nonsecure_entry] We want this eventually

stage0/src/main.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
44

55
#![feature(cmse_nonsecure_entry)]
6-
#![feature(asm)]
76
#![feature(naked_functions)]
87
#![feature(array_methods)]
98
#![no_main]
@@ -13,6 +12,8 @@ extern crate panic_halt;
1312
use cortex_m::peripheral::Peripherals;
1413
use cortex_m_rt::entry;
1514

15+
use core::arch::asm;
16+
1617
mod hypo;
1718
mod image_header;
1819

sys/kern/src/arch/arm_m.rs

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
//! context switches, and just always do full save/restore, eliminating PendSV.
7373
//! We'll see.
7474
75+
use core::arch::asm;
7576
use core::ptr::NonNull;
7677

7778
use zerocopy::FromBytes;

sys/kern/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
//! most clever algorithms used in kernels wind up requiring `unsafe`.)
2828
2929
#![cfg_attr(target_os = "none", no_std)]
30-
#![feature(asm)]
30+
#![feature(asm_sym)]
31+
#![feature(asm_const)]
3132
#![feature(naked_functions)]
3233

3334
#[macro_use]

sys/userlib/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
//! See: https://github.com/rust-lang/rust/issues/73450#issuecomment-650463347
2626
2727
#![no_std]
28-
#![feature(asm)]
28+
#![feature(asm_const)]
29+
#![feature(asm_sym)]
2930
#![feature(naked_functions)]
3031

3132
#[macro_use]
@@ -35,6 +36,7 @@ pub use abi::*;
3536
pub use num_derive::{FromPrimitive, ToPrimitive};
3637
pub use num_traits::{FromPrimitive, ToPrimitive};
3738

39+
use core::arch::asm;
3840
use core::marker::PhantomData;
3941

4042
pub mod hl;

task/ping/src/main.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
#![no_std]
66
#![no_main]
7-
#![feature(asm)]
7+
8+
use core::arch::asm;
89

910
use userlib::*;
1011

0 commit comments

Comments
 (0)