]>
Commit | Line | Data |
---|---|---|
dfeec247 XL |
1 | #![feature(raw_ref_op)] |
2 | ||
3 | const fn mutable_address_of_in_const() { | |
4 | let mut a = 0; | |
29967ef6 | 5 | let b = &raw mut a; //~ ERROR mutable reference |
dfeec247 XL |
6 | } |
7 | ||
8 | struct X; | |
9 | ||
10 | impl X { | |
11 | const fn inherent_mutable_address_of_in_const() { | |
12 | let mut a = 0; | |
29967ef6 | 13 | let b = &raw mut a; //~ ERROR mutable reference |
dfeec247 XL |
14 | } |
15 | } | |
16 | ||
17 | fn main() {} |