blob: 40d1882d7d2ad0ebab630acde3acd3fc77bd6278 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#![feature(raw_ref_op)]
const fn mutable_address_of_in_const() {
let mut a = 0;
let b = &raw mut a; //~ ERROR mutable reference
}
struct X;
impl X {
const fn inherent_mutable_address_of_in_const() {
let mut a = 0;
let b = &raw mut a; //~ ERROR mutable reference
}
}
fn main() {}
|