mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-19 02:13:57 +00:00
18 lines
282 B
Rust
18 lines
282 B
Rust
//@ known-bug: #122548
|
|
#![feature(const_mut_refs)]
|
|
#![feature(const_refs_to_static)]
|
|
|
|
use std::cell::UnsafeCell;
|
|
|
|
struct Meh {
|
|
x: &'static UnsafeCell<i32>,
|
|
}
|
|
|
|
const MUH: Meh = Meh {
|
|
x: &mut *(&READONLY as *const _ as *mut _),
|
|
};
|
|
|
|
static READONLY: i32 = 0;
|
|
|
|
pub fn main() {}
|