1
Fork 0
rust/src/test/ui/consts/read_from_static_mut_ref.rs

11 lines
180 B
Rust
Raw Normal View History

2019-11-28 11:38:07 -05:00
// run-pass
#![feature(const_mut_refs)]
2019-11-28 11:38:07 -05:00
#![allow(const_err)]
static OH_YES: &mut i32 = &mut 42;
fn main() {
// Make sure `OH_YES` can be read.
assert_eq!(*OH_YES, 42);
}