Skip to content

Commit

Permalink
refactor: remove #![feature(raw_ref_macros)], start using it everyw…
Browse files Browse the repository at this point in the history
…here

`raw_ref_macros` has been stabilized by
<rust-lang/rust#80886>.
  • Loading branch information
yvt committed Feb 19, 2021
1 parent 6a79628 commit ba51f31
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/r3/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#![feature(exhaustive_patterns)] // `let Ok(()) = Ok::<(), !>(())`
#![feature(decl_macro)]
#![feature(set_ptr_value)] // `<*const T>::set_ptr_value`
#![feature(raw_ref_macros)]
#![feature(or_patterns)]
#![feature(option_result_unwrap_unchecked)] // `Option<T>::unwrap_unchecked`
#![feature(cfg_target_has_atomic)] // `#[cfg(target_has_atomic_load_store)]`
Expand Down
3 changes: 1 addition & 2 deletions src/r3_port_arm/src/sp804/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ macro_rules! use_sp804 {
type TicklessState = tickless::TicklessState<TICKLESS_CFG>;

fn tickless_state() -> *mut Self::TicklessState {
// FIXME: Use `core::ptr::addr_of_mut!` when it's stable
unsafe { &mut TIMER_STATE }
unsafe { core::ptr::addr_of_mut!(TIMER_STATE) }
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/r3_port_riscv/src/timer/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ macro_rules! use_timer {
type TicklessState = tickless::TicklessState<TICKLESS_CFG>;

fn tickless_state() -> *mut Self::TicklessState {
// FIXME: Use `core::ptr::addr_of_mut!` when it's stable
unsafe { &mut TIMER_STATE }
unsafe { core::ptr::addr_of_mut!(TIMER_STATE) }
}
}

Expand Down
1 change: 0 additions & 1 deletion src/r3_port_riscv_test_driver/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#![feature(naked_functions)]
#![feature(global_asm)]
#![feature(decl_macro)]
#![feature(raw_ref_macros)]
#![feature(const_ptr_offset)]
#![feature(unsafe_block_in_unsafe_fn)] // `unsafe fn` doesn't imply `unsafe {}`
#![deny(unsafe_op_in_unsafe_fn)]
Expand Down
3 changes: 1 addition & 2 deletions src/r3_support_rza1/src/os_timer/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ macro_rules! use_os_timer {
type TicklessState = tickless::TicklessState<TICKLESS_CFG>;

fn tickless_state() -> *mut Self::TicklessState {
// FIXME: Use `core::ptr::addr_of_mut!` when it's stable
unsafe { &mut TIMER_STATE }
unsafe { core::ptr::addr_of_mut!(TIMER_STATE) }
}
}

Expand Down

0 comments on commit ba51f31

Please sign in to comment.