mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
18 lines
327 B
Rust
18 lines
327 B
Rust
#![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() {}
|