Skip to content

Commit adaf6df

Browse files
author
wenhaozhao
committed
fix bench-kernel module compile error with rustc 1.77.0-nightly (62d7ed4a6 2024-01-11)
mutable reference of mutable static is discouraged for more information, see issue #114447 <rust-lang/rust#114447> reference of mutable static is a hard error from 2024 edition
1 parent 9b81037 commit adaf6df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bench-kernel/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ extern "C" fn rust_main(hartid: usize, _dtb_pa: usize) -> ! {
3333
static mut ebss: u64;
3434
}
3535
unsafe {
36-
let mut ptr = &mut sbss as *mut u64;
37-
let end = &mut ebss as *mut u64;
36+
let mut ptr = sbss as *mut u64;
37+
let end = ebss as *mut u64;
3838
while ptr < end {
3939
ptr.write_volatile(0);
4040
ptr = ptr.offset(1);

0 commit comments

Comments
 (0)