Skip to content

Commit ba51f31

Browse files
committed
refactor: remove #![feature(raw_ref_macros)], start using it everywhere
`raw_ref_macros` has been stabilized by <rust-lang/rust#80886>.
1 parent 6a79628 commit ba51f31

File tree

5 files changed

+3
-8
lines changed

5 files changed

+3
-8
lines changed

src/r3/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#![feature(exhaustive_patterns)] // `let Ok(()) = Ok::<(), !>(())`
1414
#![feature(decl_macro)]
1515
#![feature(set_ptr_value)] // `<*const T>::set_ptr_value`
16-
#![feature(raw_ref_macros)]
1716
#![feature(or_patterns)]
1817
#![feature(option_result_unwrap_unchecked)] // `Option<T>::unwrap_unchecked`
1918
#![feature(cfg_target_has_atomic)] // `#[cfg(target_has_atomic_load_store)]`

src/r3_port_arm/src/sp804/cfg.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ macro_rules! use_sp804 {
9393
type TicklessState = tickless::TicklessState<TICKLESS_CFG>;
9494

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

src/r3_port_riscv/src/timer/cfg.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ macro_rules! use_timer {
9797
type TicklessState = tickless::TicklessState<TICKLESS_CFG>;
9898

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

src/r3_port_riscv_test_driver/src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![feature(naked_functions)]
66
#![feature(global_asm)]
77
#![feature(decl_macro)]
8-
#![feature(raw_ref_macros)]
98
#![feature(const_ptr_offset)]
109
#![feature(unsafe_block_in_unsafe_fn)] // `unsafe fn` doesn't imply `unsafe {}`
1110
#![deny(unsafe_op_in_unsafe_fn)]

src/r3_support_rza1/src/os_timer/cfg.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ macro_rules! use_os_timer {
9292
type TicklessState = tickless::TicklessState<TICKLESS_CFG>;
9393

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

0 commit comments

Comments
 (0)