fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
818 B21 linesraw
1error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
2  --> $DIR/issue-17718-const-borrow.rs:4:39
3   |
4LL | const B: &'static UnsafeCell<usize> = &A;
5   |                                       ^^
6
7error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
8  --> $DIR/issue-17718-const-borrow.rs:9:39
9   |
10LL | const E: &'static UnsafeCell<usize> = &D.a;
11   |                                       ^^^^
12
13error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
14  --> $DIR/issue-17718-const-borrow.rs:11:23
15   |
16LL | const F: &'static C = &D;
17   |                       ^^
18
19error: aborting due to 3 previous errors
20
21For more information about this error, try `rustc --explain E0492`.