| error[E0080]: erroneous constant used |
| --> $DIR/const_refers_to_static.rs:25:5 |
| | |
| LL | MUTATE_INTERIOR_MUT; |
| | ^^^^^^^^^^^^^^^^^^^ referenced constant has errors |
| |
| error[E0080]: erroneous constant used |
| --> $DIR/const_refers_to_static.rs:27:5 |
| | |
| LL | READ_INTERIOR_MUT; |
| | ^^^^^^^^^^^^^^^^^ referenced constant has errors |
| |
| error[E0080]: erroneous constant used |
| --> $DIR/const_refers_to_static.rs:29:5 |
| | |
| LL | READ_MUT; |
| | ^^^^^^^^ referenced constant has errors |
| |
| warning: skipping const checks |
| | |
| help: skipping check that does not even have a feature gate |
| --> $DIR/const_refers_to_static.rs:13:5 |
| | |
| LL | FOO.fetch_add(1, Ordering::Relaxed) |
| | ^^^ |
| help: skipping check that does not even have a feature gate |
| --> $DIR/const_refers_to_static.rs:13:5 |
| | |
| LL | FOO.fetch_add(1, Ordering::Relaxed) |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| help: skipping check that does not even have a feature gate |
| --> $DIR/const_refers_to_static.rs:18:17 |
| | |
| LL | unsafe { *(&FOO as *const _ as *const usize) } |
| | ^^^ |
| help: skipping check that does not even have a feature gate |
| --> $DIR/const_refers_to_static.rs:22:32 |
| | |
| LL | const READ_MUT: u32 = unsafe { MUTABLE }; |
| | ^^^^^^^ |
| help: skipping check that does not even have a feature gate |
| --> $DIR/const_refers_to_static.rs:22:32 |
| | |
| LL | const READ_MUT: u32 = unsafe { MUTABLE }; |
| | ^^^^^^^ |
| |
| error: aborting due to 3 previous errors; 1 warning emitted |
| |
| For more information about this error, try `rustc --explain E0080`. |
| Future incompatibility report: Future breakage diagnostic: |
| warning: any use of this value will cause an error |
| --> $DIR/const_refers_to_static.rs:13:5 |
| | |
| LL | const MUTATE_INTERIOR_MUT: usize = { |
| | -------------------------------- |
| LL | static FOO: AtomicUsize = AtomicUsize::new(0); |
| LL | FOO.fetch_add(1, Ordering::Relaxed) |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `AtomicUsize::fetch_add` |
| | |
| note: the lint level is defined here |
| --> $DIR/const_refers_to_static.rs:3:10 |
| | |
| LL | #![allow(const_err)] |
| | ^^^^^^^^^ |
| = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> |
| |
| Future breakage diagnostic: |
| warning: any use of this value will cause an error |
| --> $DIR/const_refers_to_static.rs:18:14 |
| | |
| LL | const READ_INTERIOR_MUT: usize = { |
| | ------------------------------ |
| LL | static FOO: AtomicUsize = AtomicUsize::new(0); |
| LL | unsafe { *(&FOO as *const _ as *const usize) } |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static |
| | |
| note: the lint level is defined here |
| --> $DIR/const_refers_to_static.rs:3:10 |
| | |
| LL | #![allow(const_err)] |
| | ^^^^^^^^^ |
| = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> |
| |
| Future breakage diagnostic: |
| warning: any use of this value will cause an error |
| --> $DIR/const_refers_to_static.rs:22:32 |
| | |
| LL | const READ_MUT: u32 = unsafe { MUTABLE }; |
| | ------------------- ^^^^^^^ constant accesses static |
| | |
| note: the lint level is defined here |
| --> $DIR/const_refers_to_static.rs:3:10 |
| | |
| LL | #![allow(const_err)] |
| | ^^^^^^^^^ |
| = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> |
| |