rust/tests/ui/issues/issue-54410.rs
Obei Sideg 408eeae59d Improve wording of static_mut_ref
Rename `static_mut_ref` lint to `static_mut_refs`.
2024-02-18 06:01:40 +03:00

10 lines
284 B
Rust

extern "C" {
pub static mut symbol: [i8];
//~^ ERROR the size for values of type `[i8]` cannot be known at compilation time
}
fn main() {
println!("{:p}", unsafe { &symbol });
//~^ WARN creating a shared reference to mutable static is discouraged [static_mut_refs]
}