about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/crashes/134336.rs11
-rw-r--r--tests/crashes/134355.rs6
-rw-r--r--tests/crashes/134479.rs24
-rw-r--r--tests/crashes/134587.rs27
-rw-r--r--tests/crashes/134615.rs16
-rw-r--r--tests/crashes/134641.rs13
-rw-r--r--tests/crashes/134654.rs12
-rw-r--r--tests/crashes/134838.rs14
-rw-r--r--tests/crashes/134905.rs16
-rw-r--r--tests/crashes/135020.rs11
-rw-r--r--tests/crashes/135039.rs34
11 files changed, 184 insertions, 0 deletions
diff --git a/tests/crashes/134336.rs b/tests/crashes/134336.rs
new file mode 100644
index 00000000000..14b88e14f04
--- /dev/null
+++ b/tests/crashes/134336.rs
@@ -0,0 +1,11 @@
+//@ known-bug: #134336
+#![expect(incomplete_features)]
+#![feature(explicit_tail_calls)]
+
+trait Tr {
+    fn f();
+}
+
+fn g<T: Tr>() {
+    become T::f();
+}
diff --git a/tests/crashes/134355.rs b/tests/crashes/134355.rs
new file mode 100644
index 00000000000..b662341e6b1
--- /dev/null
+++ b/tests/crashes/134355.rs
@@ -0,0 +1,6 @@
+//@ known-bug: #134355
+
+//@compile-flags: --crate-type=lib
+fn digit() -> str {
+    return { i32::MIN };
+}
diff --git a/tests/crashes/134479.rs b/tests/crashes/134479.rs
new file mode 100644
index 00000000000..0e4ddb2bfd5
--- /dev/null
+++ b/tests/crashes/134479.rs
@@ -0,0 +1,24 @@
+//@ known-bug: #134479
+//@ compile-flags: -Csymbol-mangling-version=v0 -Cdebuginfo=1
+
+#![feature(generic_const_exprs)]
+
+fn main() {
+    test::<2>();
+}
+
+struct Test<const N: usize>;
+
+fn new<const N: usize>() -> Test<N>
+where
+    [(); N * 1]: Sized,
+{
+    Test
+}
+
+fn test<const N: usize>() -> Test<{ N - 1 }>
+where
+    [(); (N - 1) * 1]: Sized,
+{
+    new()
+}
diff --git a/tests/crashes/134587.rs b/tests/crashes/134587.rs
new file mode 100644
index 00000000000..6d4441012e0
--- /dev/null
+++ b/tests/crashes/134587.rs
@@ -0,0 +1,27 @@
+//@ known-bug: #134587
+
+use std::ops::Add;
+
+pub fn foo<T>(slf: *const T)
+where
+    *const T: Add,
+{
+    slf + slf;
+}
+
+pub fn foo2<T>(slf: *const T)
+where
+    *const T: Add<u8>,
+{
+    slf + 1_u8;
+}
+
+
+pub trait TimesTwo
+   where *const Self: Add<*const Self>,
+{
+   extern "C" fn t2_ptr(slf: *const Self)
+   -> <*const Self as Add<*const Self>>::Output {
+       slf + slf
+   }
+}
diff --git a/tests/crashes/134615.rs b/tests/crashes/134615.rs
new file mode 100644
index 00000000000..d7aa51389a0
--- /dev/null
+++ b/tests/crashes/134615.rs
@@ -0,0 +1,16 @@
+//@ known-bug: #134615
+
+#![feature(generic_const_exprs)]
+
+trait Trait {
+    const CONST: usize;
+}
+
+fn f()
+where
+    for<'a> (): Trait,
+    [(); <() as Trait>::CONST]:,
+{
+}
+
+pub fn main() {}
diff --git a/tests/crashes/134641.rs b/tests/crashes/134641.rs
new file mode 100644
index 00000000000..e3e5ab69287
--- /dev/null
+++ b/tests/crashes/134641.rs
@@ -0,0 +1,13 @@
+//@ known-bug: #134641
+#![feature(associated_const_equality)]
+
+pub trait IsVoid {
+    const IS_VOID: bool;
+}
+impl IsVoid for () {
+    const IS_VOID: bool = true;
+}
+
+pub trait Maybe {}
+impl Maybe for () {}
+impl Maybe for () where (): IsVoid<IS_VOID = true> {}
diff --git a/tests/crashes/134654.rs b/tests/crashes/134654.rs
new file mode 100644
index 00000000000..8a8d18359e9
--- /dev/null
+++ b/tests/crashes/134654.rs
@@ -0,0 +1,12 @@
+//@ known-bug: #134654
+//@ compile-flags: -Zmir-enable-passes=+GVN -Zmir-enable-passes=+Inline -Zvalidate-mir
+//@ only-x86_64
+
+fn function_with_bytes<const BYTES:
+    &'static [u8; 0xa9008fb6c9d81e42_0e25730562a601c8_u128]>() -> &'static [u8] {
+    BYTES
+}
+
+fn main() {
+    function_with_bytes::<b"aa">() == &[];
+}
diff --git a/tests/crashes/134838.rs b/tests/crashes/134838.rs
new file mode 100644
index 00000000000..ac8af09b31b
--- /dev/null
+++ b/tests/crashes/134838.rs
@@ -0,0 +1,14 @@
+//@ known-bug: #134838
+#![feature(type_ascription)]
+#![allow(dead_code)]
+
+struct Ty(());
+
+fn mk() -> impl Sized {
+    if false {
+         let _ = type_ascribe!(mk(), Ty).0;
+    }
+    Ty(())
+}
+
+fn main() {}
diff --git a/tests/crashes/134905.rs b/tests/crashes/134905.rs
new file mode 100644
index 00000000000..9f0f0f4b3f2
--- /dev/null
+++ b/tests/crashes/134905.rs
@@ -0,0 +1,16 @@
+//@ known-bug: #134905
+
+trait Iterate<'a> {
+    type Ty: Valid;
+}
+impl<'a, T> Iterate<'a> for T
+where
+    T: Check,
+{
+    default type Ty = ();
+}
+
+trait Check {}
+impl<'a, T> Eq for T where <T as Iterate<'a>>::Ty: Valid {}
+
+trait Valid {}
diff --git a/tests/crashes/135020.rs b/tests/crashes/135020.rs
new file mode 100644
index 00000000000..b44056eb3af
--- /dev/null
+++ b/tests/crashes/135020.rs
@@ -0,0 +1,11 @@
+//@ known-bug: #135020
+
+pub fn problem_thingy(items: &mut impl Iterator<Item = str>) {
+    let mut peeker = items.peekable();
+    match peeker.peek() {
+        Some(_) => (),
+        None => return (),
+    }
+}
+
+pub fn main() {}
diff --git a/tests/crashes/135039.rs b/tests/crashes/135039.rs
new file mode 100644
index 00000000000..c4c5336fd4f
--- /dev/null
+++ b/tests/crashes/135039.rs
@@ -0,0 +1,34 @@
+//@ known-bug: #135039
+//@ edition:2021
+
+pub type UserId<Backend> = <<Backend as AuthnBackend>::User as AuthUser>::Id;
+
+pub trait AuthUser {
+    type Id;
+}
+
+pub trait AuthnBackend {
+    type User: AuthUser;
+}
+
+pub struct AuthSession<Backend: AuthnBackend> {
+    user: Option<Backend::User>,
+    data: Option<UserId<Backend>>,
+}
+
+pub trait Authz: Sized {
+    type AuthnBackend: AuthnBackend<User = Self>;
+}
+
+pub trait Query<User: Authz> {
+    type Output;
+    async fn run(&self) -> Result<Self::Output, ()>;
+}
+
+pub async fn run_query<User: Authz, Q: Query<User> + 'static>(
+    auth: AuthSession<User::AuthnBackend>,
+    query: Q,
+) -> Result<Q::Output, ()> {
+    let user = auth.user;
+    query.run().await
+}