summary refs log tree commit diff
path: root/src/test/ui/error-codes/E0017.rs
blob: 71250eb4621f86f46784653e51b080199887d93c (plain)
1
2
3
4
5
6
7
8
9
static X: i32 = 1;
const C: i32 = 2;

const CR: &'static mut i32 = &mut C; //~ ERROR E0017
static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
                                              //~| ERROR cannot borrow
                                              //~| ERROR cannot mutate statics
static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017
fn main() {}