mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
13 lines
147 B
Rust
13 lines
147 B
Rust
// check-pass
|
|
|
|
#![feature(const_refs_to_cell)]
|
|
|
|
const FOO: () = {
|
|
let x = std::cell::Cell::new(42);
|
|
let y = &x;
|
|
};
|
|
|
|
fn main() {
|
|
FOO;
|
|
}
|