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

const CR: &'static mut i32 = &mut C; //~ ERROR E0764
static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0764
                                              //~| ERROR E0019
                                              //~| ERROR cannot borrow
static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0764
static STATIC_MUT_REF: &'static mut i32 = unsafe { &mut M }; //~ ERROR E0764
fn main() {}