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-07 21:35:35 -06: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 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
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`.