rust/tests/ui/error-codes/E0492.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
704 B
Plaintext
Raw Normal View History

error[E0492]: constants cannot refer to interior mutable data
--> $DIR/E0492.rs:4:33
2018-02-08 03:35:35 +00:00
|
LL | const B: &'static AtomicUsize = &A;
| ^^ this borrow of an interior mutable value may end up in the final value
error[E0492]: statics cannot refer to interior mutable data
--> $DIR/E0492.rs:5:34
|
LL | static C: &'static AtomicUsize = &A;
| ^^ 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
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`.