mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-01 13:34:38 +00:00
20 lines
274 B
Rust
20 lines
274 B
Rust
// check-pass
|
|
|
|
#![feature(raw_ref_op)]
|
|
|
|
const fn const_address_of_in_const() {
|
|
let mut a = 0;
|
|
let b = &raw const a;
|
|
}
|
|
|
|
struct X;
|
|
|
|
impl X {
|
|
const fn inherent_const_address_of_in_const() {
|
|
let mut a = 0;
|
|
let b = &raw const a;
|
|
}
|
|
}
|
|
|
|
fn main() {}
|