about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/crashes/131507.rs10
-rw-r--r--tests/crashes/131534.rs5
-rw-r--r--tests/crashes/131535.rs4
-rw-r--r--tests/crashes/131538.rs13
-rw-r--r--tests/ui/consts/const-unwrap.rs10
-rw-r--r--tests/ui/consts/const-unwrap.stderr12
-rw-r--r--tests/ui/meta/revision-bad.rs1
7 files changed, 49 insertions, 6 deletions
diff --git a/tests/crashes/131507.rs b/tests/crashes/131507.rs
new file mode 100644
index 00000000000..d402fb8afc3
--- /dev/null
+++ b/tests/crashes/131507.rs
@@ -0,0 +1,10 @@
+//@ known-bug: #131507
+//@ compile-flags: -Zmir-opt-level=5 -Zvalidate-mir
+#![feature(non_lifetime_binders)]
+
+fn brick()
+where
+    for<T> T: Copy,
+{
+    || format_args!("");
+}
diff --git a/tests/crashes/131534.rs b/tests/crashes/131534.rs
new file mode 100644
index 00000000000..545b3e68fe8
--- /dev/null
+++ b/tests/crashes/131534.rs
@@ -0,0 +1,5 @@
+//@ known-bug: #131534
+#![feature(generic_const_exprs)]
+type Value<'v> = &[[u8; SIZE]];
+
+trait Trait: Fn(Value) -> Value {}
diff --git a/tests/crashes/131535.rs b/tests/crashes/131535.rs
new file mode 100644
index 00000000000..47ccdf87f2d
--- /dev/null
+++ b/tests/crashes/131535.rs
@@ -0,0 +1,4 @@
+//@ known-bug: #131535
+#![feature(non_lifetime_binders)]
+trait v0<> {}
+fn kind  :(v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
diff --git a/tests/crashes/131538.rs b/tests/crashes/131538.rs
new file mode 100644
index 00000000000..f971d8b7791
--- /dev/null
+++ b/tests/crashes/131538.rs
@@ -0,0 +1,13 @@
+//@ known-bug: #131538
+#![feature(generic_associated_types_extended)]
+#![feature(trivial_bounds)]
+
+trait HealthCheck {
+    async fn check<const N: usize>();
+}
+
+fn do_health_check_par()
+where
+    HealthCheck: HealthCheck,
+{
+}
diff --git a/tests/ui/consts/const-unwrap.rs b/tests/ui/consts/const-unwrap.rs
index bc79c7db2fc..ea0a15af1be 100644
--- a/tests/ui/consts/const-unwrap.rs
+++ b/tests/ui/consts/const-unwrap.rs
@@ -1,11 +1,15 @@
 //@ check-fail
-
-#![feature(const_option)]
+// Verify that panicking `const_option` methods do the correct thing
 
 const FOO: i32 = Some(42i32).unwrap();
 
 const BAR: i32 = Option::<i32>::None.unwrap();
-//~^ERROR: evaluation of constant value failed
+//~^ ERROR: evaluation of constant value failed
+//~| NOTE: the evaluated program panicked
+
+const BAZ: i32 = Option::<i32>::None.expect("absolutely not!");
+//~^ ERROR: evaluation of constant value failed
+//~| NOTE: absolutely not!
 
 fn main() {
     println!("{}", FOO);
diff --git a/tests/ui/consts/const-unwrap.stderr b/tests/ui/consts/const-unwrap.stderr
index fee22a1d070..aa5dd9a5c36 100644
--- a/tests/ui/consts/const-unwrap.stderr
+++ b/tests/ui/consts/const-unwrap.stderr
@@ -1,9 +1,15 @@
 error[E0080]: evaluation of constant value failed
-  --> $DIR/const-unwrap.rs:7:18
+  --> $DIR/const-unwrap.rs:6:18
    |
 LL | const BAR: i32 = Option::<i32>::None.unwrap();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'called `Option::unwrap()` on a `None` value', $DIR/const-unwrap.rs:7:38
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'called `Option::unwrap()` on a `None` value', $DIR/const-unwrap.rs:6:38
 
-error: aborting due to 1 previous error
+error[E0080]: evaluation of constant value failed
+  --> $DIR/const-unwrap.rs:10:18
+   |
+LL | const BAZ: i32 = Option::<i32>::None.expect("absolutely not!");
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'absolutely not!', $DIR/const-unwrap.rs:10:38
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/meta/revision-bad.rs b/tests/ui/meta/revision-bad.rs
index c5193b19d9e..0af5624ff9c 100644
--- a/tests/ui/meta/revision-bad.rs
+++ b/tests/ui/meta/revision-bad.rs
@@ -5,6 +5,7 @@
 //@ revisions: foo bar
 //@ should-fail
 //@ needs-run-enabled
+//@ compile-flags: --remap-path-prefix={{src-base}}=remapped
 //@[foo] error-pattern:bar
 //@[bar] error-pattern:foo