2021-01-03 08:46:19 -06:00
|
|
|
error[E0492]: constants cannot refer to interior mutable data
|
2020-12-30 11:20:38 -06:00
|
|
|
--> $DIR/E0492.rs:4:33
|
2018-02-07 21:35:35 -06:00
|
|
|
|
|
2020-12-27 11:33:56 -06:00
|
|
|
LL | const B: &'static AtomicUsize = &A;
|
2021-01-03 08:46:19 -06:00
|
|
|
| ^^ this borrow of an interior mutable value may end up in the final value
|
2020-12-27 11:33:56 -06:00
|
|
|
|
2021-01-03 08:46:19 -06:00
|
|
|
error[E0492]: statics cannot refer to interior mutable data
|
2020-12-30 11:20:38 -06:00
|
|
|
--> $DIR/E0492.rs:5:34
|
2020-12-27 11:33:56 -06:00
|
|
|
|
|
|
|
|
LL | static C: &'static AtomicUsize = &A;
|
2021-01-03 08:46:19 -06:00
|
|
|
| ^^ this borrow of an interior mutable value may end up in the final value
|
|
|
|
|
|
2021-01-03 09:11:34 -06:00
|
|
|
= help: to fix this, the value can be extracted to a separate `static` item and then referenced
|
2018-02-07 21:35:35 -06:00
|
|
|
|
2020-12-27 11:33:56 -06:00
|
|
|
error: aborting due to 2 previous errors
|
2018-02-07 21:35:35 -06:00
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about this error, try `rustc --explain E0492`.
|