rust/tests/ui/consts/min_const_fn/address_of_const.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
274 B
Rust
Raw Normal View History

2019-09-18 15:31:25 -05:00
// 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() {}