summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/miri_unleashed
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
commit1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch)
tree3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /tests/ui/consts/miri_unleashed
parentReleasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz
rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/consts/miri_unleashed')
-rw-r--r--tests/ui/consts/miri_unleashed/assoc_const.stderr6
-rw-r--r--tests/ui/consts/miri_unleashed/assoc_const_2.stderr6
-rw-r--r--tests/ui/consts/miri_unleashed/box.rs5
-rw-r--r--tests/ui/consts/miri_unleashed/box.stderr29
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr32
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr32
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs4
-rw-r--r--tests/ui/consts/miri_unleashed/tls.stderr4
8 files changed, 24 insertions, 94 deletions
diff --git a/tests/ui/consts/miri_unleashed/assoc_const.stderr b/tests/ui/consts/miri_unleashed/assoc_const.stderr
index e1da43c3a..8e22cb74b 100644
--- a/tests/ui/consts/miri_unleashed/assoc_const.stderr
+++ b/tests/ui/consts/miri_unleashed/assoc_const.stderr
@@ -25,12 +25,6 @@ note: erroneous constant used
LL | let y = <String as Bar<Vec<u32>, String>>::F;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: erroneous constant used
- --> $DIR/assoc_const.rs:29:13
- |
-LL | let y = <String as Bar<Vec<u32>, String>>::F;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
warning: skipping const checks
|
help: skipping check that does not even have a feature gate
diff --git a/tests/ui/consts/miri_unleashed/assoc_const_2.stderr b/tests/ui/consts/miri_unleashed/assoc_const_2.stderr
index fc4b18056..ae7b03fc9 100644
--- a/tests/ui/consts/miri_unleashed/assoc_const_2.stderr
+++ b/tests/ui/consts/miri_unleashed/assoc_const_2.stderr
@@ -16,12 +16,6 @@ note: erroneous constant used
LL | let y = <String as Bar<String>>::F;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: erroneous constant used
- --> $DIR/assoc_const_2.rs:27:13
- |
-LL | let y = <String as Bar<String>>::F;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
error: aborting due to previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/miri_unleashed/box.rs b/tests/ui/consts/miri_unleashed/box.rs
index c2a260aa1..39cddda2b 100644
--- a/tests/ui/consts/miri_unleashed/box.rs
+++ b/tests/ui/consts/miri_unleashed/box.rs
@@ -1,12 +1,11 @@
// compile-flags: -Zunleash-the-miri-inside-of-you
-#![feature(box_syntax)]
use std::mem::ManuallyDrop;
fn main() {}
static TEST_BAD: &mut i32 = {
- &mut *(box 0)
+ &mut *(Box::new(0))
//~^ ERROR could not evaluate static initializer
- //~| NOTE calling non-const function `alloc::alloc::exchange_malloc`
+ //~| NOTE calling non-const function `Box::<i32>::new`
};
diff --git a/tests/ui/consts/miri_unleashed/box.stderr b/tests/ui/consts/miri_unleashed/box.stderr
index bc5d4a257..407f5d8cb 100644
--- a/tests/ui/consts/miri_unleashed/box.stderr
+++ b/tests/ui/consts/miri_unleashed/box.stderr
@@ -1,31 +1,26 @@
error[E0080]: could not evaluate static initializer
- --> $DIR/box.rs:9:11
+ --> $DIR/box.rs:8:11
|
-LL | &mut *(box 0)
- | ^^^^^^^ calling non-const function `alloc::alloc::exchange_malloc`
+LL | &mut *(Box::new(0))
+ | ^^^^^^^^^^^^^ calling non-const function `Box::<i32>::new`
warning: skipping const checks
|
help: skipping check that does not even have a feature gate
- --> $DIR/box.rs:9:11
+ --> $DIR/box.rs:8:11
|
-LL | &mut *(box 0)
- | ^^^^^^^
+LL | &mut *(Box::new(0))
+ | ^^^^^^^^^^^^^
help: skipping check for `const_mut_refs` feature
- --> $DIR/box.rs:9:16
+ --> $DIR/box.rs:8:5
|
-LL | &mut *(box 0)
- | ^
-help: skipping check for `const_mut_refs` feature
- --> $DIR/box.rs:9:5
- |
-LL | &mut *(box 0)
- | ^^^^^^^^^^^^^
+LL | &mut *(Box::new(0))
+ | ^^^^^^^^^^^^^^^^^^^
help: skipping check that does not even have a feature gate
- --> $DIR/box.rs:9:5
+ --> $DIR/box.rs:8:5
|
-LL | &mut *(box 0)
- | ^^^^^^^^^^^^^
+LL | &mut *(Box::new(0))
+ | ^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error; 1 warning emitted
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr
index 6df2fe3d0..e3a0d93f0 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr
@@ -27,7 +27,7 @@ LL | const U8_MUT: &u8 = {
}
error: could not evaluate constant pattern
- --> $DIR/const_refers_to_static_cross_crate.rs:43:9
+ --> $DIR/const_refers_to_static_cross_crate.rs:42:9
|
LL | U8_MUT => true,
| ^^^^^^
@@ -39,7 +39,7 @@ LL | unsafe { &(*static_cross_crate::ZERO_REF)[0] }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
error: could not evaluate constant pattern
- --> $DIR/const_refers_to_static_cross_crate.rs:54:9
+ --> $DIR/const_refers_to_static_cross_crate.rs:52:9
|
LL | U8_MUT2 => true,
| ^^^^^^^
@@ -51,31 +51,7 @@ LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None =>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
error: could not evaluate constant pattern
- --> $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:34:9
- |
-LL | SLICE_MUT => true,
- | ^^^^^^^^^
-
-error: could not evaluate constant pattern
- --> $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:54:9
- |
-LL | U8_MUT2 => true,
- | ^^^^^^^
-
-error: could not evaluate constant pattern
- --> $DIR/const_refers_to_static_cross_crate.rs:62:9
+ --> $DIR/const_refers_to_static_cross_crate.rs:59:9
|
LL | U8_MUT3 => true,
| ^^^^^^^
@@ -133,6 +109,6 @@ help: skipping check that does not even have a feature gate
LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to 12 previous errors; 1 warning emitted
+error: aborting due to 8 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr
index 8802f3ada..a323e9a05 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr
@@ -27,7 +27,7 @@ LL | const U8_MUT: &u8 = {
}
error: could not evaluate constant pattern
- --> $DIR/const_refers_to_static_cross_crate.rs:43:9
+ --> $DIR/const_refers_to_static_cross_crate.rs:42:9
|
LL | U8_MUT => true,
| ^^^^^^
@@ -39,7 +39,7 @@ LL | unsafe { &(*static_cross_crate::ZERO_REF)[0] }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
error: could not evaluate constant pattern
- --> $DIR/const_refers_to_static_cross_crate.rs:54:9
+ --> $DIR/const_refers_to_static_cross_crate.rs:52:9
|
LL | U8_MUT2 => true,
| ^^^^^^^
@@ -51,31 +51,7 @@ LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None =>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
error: could not evaluate constant pattern
- --> $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:34:9
- |
-LL | SLICE_MUT => true,
- | ^^^^^^^^^
-
-error: could not evaluate constant pattern
- --> $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:54:9
- |
-LL | U8_MUT2 => true,
- | ^^^^^^^
-
-error: could not evaluate constant pattern
- --> $DIR/const_refers_to_static_cross_crate.rs:62:9
+ --> $DIR/const_refers_to_static_cross_crate.rs:59:9
|
LL | U8_MUT3 => true,
| ^^^^^^^
@@ -133,6 +109,6 @@ help: skipping check that does not even have a feature gate
LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to 12 previous errors; 1 warning emitted
+error: aborting due to 8 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs
index bf4f14f4d..bbaa32ddf 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs
@@ -33,7 +33,6 @@ pub fn test(x: &[u8; 1]) -> bool {
match x {
SLICE_MUT => true,
//~^ ERROR could not evaluate constant pattern
- //~| ERROR could not evaluate constant pattern
&[1..] => false,
}
}
@@ -42,7 +41,6 @@ pub fn test2(x: &u8) -> bool {
match x {
U8_MUT => true,
//~^ ERROR could not evaluate constant pattern
- //~| ERROR could not evaluate constant pattern
&(1..) => false,
}
}
@@ -53,7 +51,6 @@ pub fn test3(x: &u8) -> bool {
match x {
U8_MUT2 => true,
//~^ ERROR could not evaluate constant pattern
- //~| ERROR could not evaluate constant pattern
&(1..) => false,
}
}
@@ -61,7 +58,6 @@ pub fn test4(x: &u8) -> bool {
match x {
U8_MUT3 => true,
//~^ ERROR could not evaluate constant pattern
- //~| ERROR could not evaluate constant pattern
&(1..) => false,
}
}
diff --git a/tests/ui/consts/miri_unleashed/tls.stderr b/tests/ui/consts/miri_unleashed/tls.stderr
index 7aaeadd04..ec24527d6 100644
--- a/tests/ui/consts/miri_unleashed/tls.stderr
+++ b/tests/ui/consts/miri_unleashed/tls.stderr
@@ -2,13 +2,13 @@ error[E0080]: could not evaluate static initializer
--> $DIR/tls.rs:11:25
|
LL | unsafe { let _val = A; }
- | ^ cannot access thread local static (DefId(0:4 ~ tls[78b0]::A))
+ | ^ cannot access thread local static (DefId(0:4 ~ tls[ca29]::A))
error[E0080]: could not evaluate static initializer
--> $DIR/tls.rs:18:26
|
LL | unsafe { let _val = &A; }
- | ^ cannot access thread local static (DefId(0:4 ~ tls[78b0]::A))
+ | ^ cannot access thread local static (DefId(0:4 ~ tls[ca29]::A))
warning: skipping const checks
|