summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/issue-17718-const-bad-values.rs
blob: 62bbb3b569c37513645204d10f4fd626ad4a1dae (plain)
1
2
3
4
5
6
7
8
9
const C1: &'static mut [usize] = &mut [];
//~^ ERROR: mutable references are not allowed

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

fn main() {}