fork/rust

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

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

1.39.0
703 B27 linesraw
1warning: skipping const checks
2  --> $DIR/mutable_const.rs:14:9
3   |
4LL |         *MUTABLE_BEHIND_RAW = 99
5   |         ^^^^^^^^^^^^^^^^^^^^^^^^
6
7error: any use of this value will cause an error
8  --> $DIR/mutable_const.rs:14:9
9   |
10LL | / const MUTATING_BEHIND_RAW: () = {
11LL | |     // Test that `MUTABLE_BEHIND_RAW` is actually immutable, by doing this at const time.
12LL | |     unsafe {
13LL | |         *MUTABLE_BEHIND_RAW = 99
14   | |         ^^^^^^^^^^^^^^^^^^^^^^^^ tried to modify constant memory
15...  |
16LL | |     }
17LL | | };
18   | |__-
19   |
20note: lint level defined here
21  --> $DIR/mutable_const.rs:4:9
22   |
23LL | #![deny(const_err)]
24   |         ^^^^^^^^^
25
26error: aborting due to previous error
27