fork/rust

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

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
586 B15 linesraw
1error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
2  --> $DIR/cell.rs:5:35
3   |
4LL | static FOO: Wrap<*mut u32> = Wrap(Cell::new(42).as_ptr());
5   |                                   ^^^^^^^^^^^^^
6
7error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
8  --> $DIR/cell.rs:14:24
9   |
10LL | const FOO2: *mut u32 = Cell::new(42).as_ptr();
11   |                        ^^^^^^^^^^^^^
12
13error: aborting due to 2 previous errors
14
15For more information about this error, try `rustc --explain E0492`.