diff options
Diffstat (limited to 'src/test/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr')
-rw-r--r-- | src/test/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr | 104 |
1 files changed, 25 insertions, 79 deletions
diff --git a/src/test/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr b/src/test/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr index 39c874d64..8802f3ada 100644 --- a/src/test/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr +++ b/src/test/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr @@ -1,5 +1,5 @@ error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static_cross_crate.rs:12:1 + --> $DIR/const_refers_to_static_cross_crate.rs:10:1 | LL | const SLICE_MUT: &[u8; 1] = { | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to a static variable in a constant @@ -10,13 +10,13 @@ LL | const SLICE_MUT: &[u8; 1] = { } error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:40:9 + --> $DIR/const_refers_to_static_cross_crate.rs:34:9 | LL | SLICE_MUT => true, | ^^^^^^^^^ error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static_cross_crate.rs:17:1 + --> $DIR/const_refers_to_static_cross_crate.rs:15:1 | LL | const U8_MUT: &u8 = { | ^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to a static variable in a constant @@ -27,75 +27,55 @@ LL | const U8_MUT: &u8 = { } error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:49:9 + --> $DIR/const_refers_to_static_cross_crate.rs:43:9 | LL | U8_MUT => true, | ^^^^^^ -warning: any use of this value will cause an error - --> $DIR/const_refers_to_static_cross_crate.rs:25:15 +error[E0080]: evaluation of constant value failed + --> $DIR/const_refers_to_static_cross_crate.rs:22:15 | -LL | const U8_MUT2: &u8 = { - | ------------------ LL | unsafe { &(*static_cross_crate::ZERO_REF)[0] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static - | -note: the lint level is defined here - --> $DIR/const_refers_to_static_cross_crate.rs:23:8 - | -LL | #[warn(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> error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:60:9 + --> $DIR/const_refers_to_static_cross_crate.rs:54:9 | LL | U8_MUT2 => true, | ^^^^^^^ -warning: any use of this value will cause an error - --> $DIR/const_refers_to_static_cross_crate.rs:32:20 +error[E0080]: evaluation of constant value failed + --> $DIR/const_refers_to_static_cross_crate.rs:27:20 | -LL | const U8_MUT3: &u8 = { - | ------------------ LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static - | -note: the lint level is defined here - --> $DIR/const_refers_to_static_cross_crate.rs:30:8 - | -LL | #[warn(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> error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:68:9 + --> $DIR/const_refers_to_static_cross_crate.rs:62:9 | LL | U8_MUT3 => true, | ^^^^^^^ error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:40:9 + --> $DIR/const_refers_to_static_cross_crate.rs:34:9 | LL | SLICE_MUT => true, | ^^^^^^^^^ error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:49:9 + --> $DIR/const_refers_to_static_cross_crate.rs:43:9 | LL | U8_MUT => true, | ^^^^^^ error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:60:9 + --> $DIR/const_refers_to_static_cross_crate.rs:54:9 | LL | U8_MUT2 => true, | ^^^^^^^ error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:68:9 + --> $DIR/const_refers_to_static_cross_crate.rs:62:9 | LL | U8_MUT3 => true, | ^^^^^^^ @@ -103,90 +83,56 @@ LL | U8_MUT3 => true, warning: skipping const checks | help: skipping check that does not even have a feature gate - --> $DIR/const_refers_to_static_cross_crate.rs:14:15 + --> $DIR/const_refers_to_static_cross_crate.rs:12:15 | LL | unsafe { &static_cross_crate::ZERO } | ^^^^^^^^^^^^^^^^^^^^^^^^ help: skipping check that does not even have a feature gate - --> $DIR/const_refers_to_static_cross_crate.rs:14:15 + --> $DIR/const_refers_to_static_cross_crate.rs:12:15 | LL | unsafe { &static_cross_crate::ZERO } | ^^^^^^^^^^^^^^^^^^^^^^^^ help: skipping check that does not even have a feature gate - --> $DIR/const_refers_to_static_cross_crate.rs:19:15 + --> $DIR/const_refers_to_static_cross_crate.rs:17:15 | LL | unsafe { &static_cross_crate::ZERO[0] } | ^^^^^^^^^^^^^^^^^^^^^^^^ help: skipping check that does not even have a feature gate - --> $DIR/const_refers_to_static_cross_crate.rs:19:15 + --> $DIR/const_refers_to_static_cross_crate.rs:17:15 | LL | unsafe { &static_cross_crate::ZERO[0] } | ^^^^^^^^^^^^^^^^^^^^^^^^ help: skipping check that does not even have a feature gate - --> $DIR/const_refers_to_static_cross_crate.rs:19:15 + --> $DIR/const_refers_to_static_cross_crate.rs:17:15 | LL | unsafe { &static_cross_crate::ZERO[0] } | ^^^^^^^^^^^^^^^^^^^^^^^^ help: skipping check that does not even have a feature gate - --> $DIR/const_refers_to_static_cross_crate.rs:25:17 + --> $DIR/const_refers_to_static_cross_crate.rs:22:17 | LL | unsafe { &(*static_cross_crate::ZERO_REF)[0] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: skipping check that does not even have a feature gate - --> $DIR/const_refers_to_static_cross_crate.rs:32:20 + --> $DIR/const_refers_to_static_cross_crate.rs:27:20 | LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: skipping check that does not even have a feature gate - --> $DIR/const_refers_to_static_cross_crate.rs:32:20 + --> $DIR/const_refers_to_static_cross_crate.rs:27:20 | LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: skipping check that does not even have a feature gate - --> $DIR/const_refers_to_static_cross_crate.rs:32:20 + --> $DIR/const_refers_to_static_cross_crate.rs:27:20 | LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: skipping check that does not even have a feature gate - --> $DIR/const_refers_to_static_cross_crate.rs:32:20 + --> $DIR/const_refers_to_static_cross_crate.rs:27:20 | LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 10 previous errors; 3 warnings emitted +error: aborting due to 12 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_cross_crate.rs:25:15 - | -LL | const U8_MUT2: &u8 = { - | ------------------ -LL | unsafe { &(*static_cross_crate::ZERO_REF)[0] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static - | -note: the lint level is defined here - --> $DIR/const_refers_to_static_cross_crate.rs:23:8 - | -LL | #[warn(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_cross_crate.rs:32:20 - | -LL | const U8_MUT3: &u8 = { - | ------------------ -LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static - | -note: the lint level is defined here - --> $DIR/const_refers_to_static_cross_crate.rs:30:8 - | -LL | #[warn(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> - |