mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
10 lines
271 B
Rust
10 lines
271 B
Rust
const C1: &'static mut [usize] = &mut [];
|
|
//~^ ERROR: mutable references are not allowed
|
|
|
|
static mut S: usize = 3;
|
|
const C2: &'static mut usize = unsafe { &mut S };
|
|
//~^ ERROR: constants cannot refer to statics
|
|
//~| ERROR: constants cannot refer to statics
|
|
|
|
fn main() {}
|