Skip to content

Commit

Permalink
roll back to compiler version "nightly-2022-07-10"
Browse files Browse the repository at this point in the history
  • Loading branch information
fvilante committed Aug 3, 2023
1 parent 39fc5bc commit 66d5516
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions bare_metal/src/board/peripherals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ use super::{
/// Abstraction over the platform specific hardware instantiation
/// TODO: Move to a better place
pub trait Peripherals {
fn get_keyboard(&self) -> impl Keyboard + '_;
fn get_front_panel(&self) -> impl FrontPanel + '_;
fn get_keyboard<'a>(&'a self) -> KeyboardAvrDriver<'a>;
fn get_front_panel<'a>(&'a self) -> FrontPanelAvrHardware<'a>;
fn get_screen_buffer(&self) -> ScreenBuffer;
}

Expand Down Expand Up @@ -55,12 +55,12 @@ impl PeripheralsAvrHardware {
}

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

fn get_front_panel(&self) -> impl FrontPanel + '_ {
fn get_front_panel<'a>(&'a self) -> FrontPanelAvrHardware<'a> {
// Leds from the frontal panel
let front_panel = FrontPanelAvrHardware::new(&self.output_expander);
front_panel
Expand Down
8 changes: 5 additions & 3 deletions bare_metal/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
#![feature(exclusive_range_pattern)]
#![allow(non_snake_case)] // remove this line when possible
#![allow(dead_code)]
#![feature(lang_items)] // Necessary to eh_personality and to run "cargo fix" on the code.
#![feature(return_position_impl_trait_in_trait)] // used in the peripherals factory abstraction
#![feature(lang_items)]
// Necessary to eh_personality and to run "cargo fix" on the code.
//#![feature(return_position_impl_trait_in_trait)] // used in the peripherals factory abstraction
#![feature(cell_update)] // used to update davigation state // TODO: check if this feature is stable enough
//
#![feature(let_else)]
//
extern crate alloc;
#[lang = "eh_personality"]
extern "C" fn eh_personality() {}
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "nightly-2023-06-21"
channel = "nightly-2022-07-10"
components = ["rust-docs", "cargo", "rustfmt", "clippy", "rust-src" ]
targets = ["avr-unknown-gnu-atmega328"]
profile = "minimal"

0 comments on commit 66d5516

Please sign in to comment.