about summary refs log tree commit diff
path: root/tests/ui/consts/min_const_fn/address_of_const.rs
blob: 1520622679fb1258592c93b9d5ba3bf3ea2df6b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ check-pass

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() {}