about summary refs log tree commit diff
path: root/src/test/ui/issues/issue-17718-const-bad-values.rs
blob: 97657f8848155bf5bc584202e88912114971d3e9 (plain)
1
2
3
4
5
6
7
8
9
const C1: &'static mut [usize] = &mut [];
//~^ ERROR: references in constants may only refer to immutable values

static mut S: usize = 3;
const C2: &'static mut usize = unsafe { &mut S };
//~^ ERROR: constants cannot refer to statics
//~| ERROR: references in constants may only refer to immutable values

fn main() {}