fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
517 B15 linesraw
1error[E0017]: references in statics may only refer to immutable values
2  --> $DIR/issue-46604.rs:1:25
3   |
4LL | static buf: &mut [u8] = &mut [1u8,2,3,4,5,7];
5   |                         ^^^^^^^^^^^^^^^^^^^^ statics require immutable values
6
7error[E0594]: cannot assign to `buf[_]`, as `buf` is an immutable static item
8  --> $DIR/issue-46604.rs:6:5
9   |
10LL |     buf[0]=2;
11   |     ^^^^^^^^ cannot assign
12
13error: aborting due to 2 previous errors
14
15For more information about this error, try `rustc --explain E0017`.