summary refs log tree commit diff
path: root/tests/ui/error-codes/E0388.rs
blob: bbc5f2710bf9a02e70faa76fcd9d9a9f135e18cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
static X: i32 = 1;
const C: i32 = 2;

const CR: &'static mut i32 = &mut C; //~ ERROR mutable references are not allowed

//~| WARN taking a mutable
static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0658

static CONST_REF: &'static mut i32 = &mut C; //~ ERROR mutable references are not allowed

//~| WARN taking a mutable

fn main() {}