]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0388.rs
Rollup merge of #97915 - tbu-:pr_os_string_fmt_write, r=joshtriplett
[rust.git] / src / test / ui / error-codes / E0388.rs
1 static X: i32 = 1;
2 const C: i32 = 2;
3
4 const CR: &'static mut i32 = &mut C; //~ ERROR mutable references are not allowed
5                                      //~| WARN taking a mutable
6 static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR cannot borrow
7                                               //~| ERROR E0658
8                                               //~| ERROR mutable references are not allowed
9
10 static CONST_REF: &'static mut i32 = &mut C; //~ ERROR mutable references are not allowed
11                                              //~| WARN taking a mutable
12
13 fn main() {}