]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0492.stderr
Merge commit 'e36a20c24f35a4cee82bbdc600289104c9237c22' into ra-sync-and-pms-component
[rust.git] / src / test / ui / error-codes / E0492.stderr
1 error[E0492]: constants cannot refer to interior mutable data
2   --> $DIR/E0492.rs:4:33
3    |
4 LL | const B: &'static AtomicUsize = &A;
5    |                                 ^^ this borrow of an interior mutable value may end up in the final value
6
7 error[E0492]: statics cannot refer to interior mutable data
8   --> $DIR/E0492.rs:5:34
9    |
10 LL | static C: &'static AtomicUsize = &A;
11    |                                  ^^ this borrow of an interior mutable value may end up in the final value
12    |
13    = help: to fix this, the value can be extracted to a separate `static` item and then referenced
14
15 error: aborting due to 2 previous errors
16
17 For more information about this error, try `rustc --explain E0492`.