Skip to content

Commit 66d5516

Browse files
committed
roll back to compiler version "nightly-2022-07-10"
1 parent 39fc5bc commit 66d5516

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

bare_metal/src/board/peripherals.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ use super::{
2121
/// Abstraction over the platform specific hardware instantiation
2222
/// TODO: Move to a better place
2323
pub trait Peripherals {
24-
fn get_keyboard(&self) -> impl Keyboard + '_;
25-
fn get_front_panel(&self) -> impl FrontPanel + '_;
24+
fn get_keyboard<'a>(&'a self) -> KeyboardAvrDriver<'a>;
25+
fn get_front_panel<'a>(&'a self) -> FrontPanelAvrHardware<'a>;
2626
fn get_screen_buffer(&self) -> ScreenBuffer;
2727
}
2828

@@ -55,12 +55,12 @@ impl PeripheralsAvrHardware {
5555
}
5656

5757
impl Peripherals for PeripheralsAvrHardware {
58-
fn get_keyboard(&self) -> impl Keyboard + '_ {
58+
fn get_keyboard<'a>(&'a self) -> KeyboardAvrDriver<'a> {
5959
let keyboard = KeyboardAvrDriver::new(&self.output_expander, &self.input_expander);
6060
keyboard
6161
}
6262

63-
fn get_front_panel(&self) -> impl FrontPanel + '_ {
63+
fn get_front_panel<'a>(&'a self) -> FrontPanelAvrHardware<'a> {
6464
// Leds from the frontal panel
6565
let front_panel = FrontPanelAvrHardware::new(&self.output_expander);
6666
front_panel

bare_metal/src/main.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
#![feature(exclusive_range_pattern)]
66
#![allow(non_snake_case)] // remove this line when possible
77
#![allow(dead_code)]
8-
#![feature(lang_items)] // Necessary to eh_personality and to run "cargo fix" on the code.
9-
#![feature(return_position_impl_trait_in_trait)] // used in the peripherals factory abstraction
8+
#![feature(lang_items)]
9+
// Necessary to eh_personality and to run "cargo fix" on the code.
10+
//#![feature(return_position_impl_trait_in_trait)] // used in the peripherals factory abstraction
1011
#![feature(cell_update)] // used to update davigation state // TODO: check if this feature is stable enough
11-
//
12+
#![feature(let_else)]
13+
//
1214
extern crate alloc;
1315
#[lang = "eh_personality"]
1416
extern "C" fn eh_personality() {}

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[toolchain]
2-
channel = "nightly-2023-06-21"
2+
channel = "nightly-2022-07-10"
33
components = ["rust-docs", "cargo", "rustfmt", "clippy", "rust-src" ]
44
targets = ["avr-unknown-gnu-atmega328"]
55
profile = "minimal"

0 commit comments

Comments
 (0)