let stack_start = VirtAddr::from_ptr(unsafe { &STACK });
^^^^^^ shared reference to mutable static
= note: for more information, see issue #114447 https://github.com/rust-lang/rust/issues/114447
= note: this will be a hard error in the 2024 edition
= note: this shared reference has lifetime 'static, but if the static ever gets mutated, or a mutable reference is created, then any further use of this shared reference is Undefined Behavior
= note: #[warn(static_mut_refs)] on by default
help: use addr_of! instead to create a raw pointer
|
13 | let stack_start = VirtAddr::from_ptr(unsafe { addr_of!(STACK) });
| ~~~
= note: for more information, see issue #114447 https://github.com/rust-lang/rust/issues/114447 = note: this will be a hard error in the 2024 edition = note: this shared reference has lifetime
'static
, but if the static ever gets mutated, or a mutable reference is created, then any further use of this shared reference is Undefined Behavior = note:#[warn(static_mut_refs)]
on by default help: useaddr_of!
instead to create a raw pointer | 13 | let stack_start = VirtAddr::from_ptr(unsafe { addr_of!(STACK) }); |~~~warning:
kernel
(bin "kernel") generated 1 warning Compiling os_t2 v0.1.0 (/AnotherOSbutinrust) Finisheddev
profile [unoptimized + debuginfo] target(s) in 4m 58s Runningtarget/debug/os_t2
gtk initialization failed