1 error[E0080]: erroneous constant used
2 --> $DIR/const_refers_to_static.rs:25:5
4 LL | MUTATE_INTERIOR_MUT;
5 | ^^^^^^^^^^^^^^^^^^^ referenced constant has errors
7 error[E0080]: erroneous constant used
8 --> $DIR/const_refers_to_static.rs:27:5
10 LL | READ_INTERIOR_MUT;
11 | ^^^^^^^^^^^^^^^^^ referenced constant has errors
13 error[E0080]: erroneous constant used
14 --> $DIR/const_refers_to_static.rs:29:5
17 | ^^^^^^^^ referenced constant has errors
19 warning: skipping const checks
21 help: skipping check that does not even have a feature gate
22 --> $DIR/const_refers_to_static.rs:13:5
24 LL | FOO.fetch_add(1, Ordering::Relaxed)
26 help: skipping check that does not even have a feature gate
27 --> $DIR/const_refers_to_static.rs:13:5
29 LL | FOO.fetch_add(1, Ordering::Relaxed)
30 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31 help: skipping check that does not even have a feature gate
32 --> $DIR/const_refers_to_static.rs:18:17
34 LL | unsafe { *(&FOO as *const _ as *const usize) }
36 help: skipping check that does not even have a feature gate
37 --> $DIR/const_refers_to_static.rs:22:32
39 LL | const READ_MUT: u32 = unsafe { MUTABLE };
41 help: skipping check that does not even have a feature gate
42 --> $DIR/const_refers_to_static.rs:22:32
44 LL | const READ_MUT: u32 = unsafe { MUTABLE };
47 error: aborting due to 3 previous errors; 1 warning emitted
49 For more information about this error, try `rustc --explain E0080`.
50 Future incompatibility report: Future breakage diagnostic:
51 warning: any use of this value will cause an error
52 --> $DIR/const_refers_to_static.rs:13:5
54 LL | const MUTATE_INTERIOR_MUT: usize = {
55 | --------------------------------
56 LL | static FOO: AtomicUsize = AtomicUsize::new(0);
57 LL | FOO.fetch_add(1, Ordering::Relaxed)
58 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `AtomicUsize::fetch_add`
60 note: the lint level is defined here
61 --> $DIR/const_refers_to_static.rs:3:10
63 LL | #![allow(const_err)]
65 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
66 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
68 Future breakage diagnostic:
69 warning: any use of this value will cause an error
70 --> $DIR/const_refers_to_static.rs:18:14
72 LL | const READ_INTERIOR_MUT: usize = {
73 | ------------------------------
74 LL | static FOO: AtomicUsize = AtomicUsize::new(0);
75 LL | unsafe { *(&FOO as *const _ as *const usize) }
76 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
78 note: the lint level is defined here
79 --> $DIR/const_refers_to_static.rs:3:10
81 LL | #![allow(const_err)]
83 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
84 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
86 Future breakage diagnostic:
87 warning: any use of this value will cause an error
88 --> $DIR/const_refers_to_static.rs:22:32
90 LL | const READ_MUT: u32 = unsafe { MUTABLE };
91 | ------------------- ^^^^^^^ constant accesses static
93 note: the lint level is defined here
94 --> $DIR/const_refers_to_static.rs:3:10
96 LL | #![allow(const_err)]
98 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
99 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>