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