diff --git a/tests/crashes/133426.rs b/tests/crashes/133426.rs new file mode 100644 index 0000000000000..307a94c0f6ca6 --- /dev/null +++ b/tests/crashes/133426.rs @@ -0,0 +1,12 @@ +//@ known-bug: #133426 + +fn a( + _: impl Iterator< + Item = [(); { + match *todo!() { ! }; + }], + >, +) { +} + +fn b(_: impl Iterator) {} diff --git a/tests/crashes/133597.rs b/tests/crashes/133597.rs new file mode 100644 index 0000000000000..f716d5e7bc74f --- /dev/null +++ b/tests/crashes/133597.rs @@ -0,0 +1,11 @@ +//@ known-bug: #133597 + +pub trait Foo2 { + fn boxed<'a: 'a>() -> impl Sized + FnOnce<()>; +} + +impl Foo2 for () {} + + +fn f() -> impl FnOnce<()> { || () } +fn main() { () = f(); } diff --git a/tests/crashes/133639.rs b/tests/crashes/133639.rs new file mode 100644 index 0000000000000..d522b0730cf86 --- /dev/null +++ b/tests/crashes/133639.rs @@ -0,0 +1,33 @@ +//@ known-bug: #133639 + +#![feature(with_negative_coherence)] +#![feature(min_specialization)] +#![feature(generic_const_exprs)] + +#![crate_type = "lib"] +use std::str::FromStr; + +struct a; + +trait c {} + +impl FromStr for e +where + a<{ d <= 2 }>: c, +{ + type Err = (); + fn from_str(f: &str) -> Result { + unimplemented!() + } +} +struct e; + +impl FromStr for e +where + a<{ d <= 2 }>: c, +{ + type Err = (); + fn from_str(f: &str) -> Result { + unimplemented!() + } +} diff --git a/tests/crashes/133808.rs b/tests/crashes/133808.rs new file mode 100644 index 0000000000000..9c6a23d1e35b5 --- /dev/null +++ b/tests/crashes/133808.rs @@ -0,0 +1,15 @@ +//@ known-bug: #133808 + +#![feature(generic_const_exprs, transmutability)] + +mod assert { + use std::mem::TransmuteFrom; + + pub fn is_transmutable() + where + Dst: TransmuteFrom, + { + } +} + +pub fn main() {} diff --git a/tests/crashes/133868.rs b/tests/crashes/133868.rs new file mode 100644 index 0000000000000..dc25cb9df288e --- /dev/null +++ b/tests/crashes/133868.rs @@ -0,0 +1,13 @@ +//@ known-bug: #133868 + +trait Foo { + type Assoc; +} + +trait Bar { + fn method() -> impl Sized; +} +impl Bar for T where ::Assoc: Sized +{ + fn method() {} +} diff --git a/tests/crashes/133965.rs b/tests/crashes/133965.rs new file mode 100644 index 0000000000000..69f533ccbe987 --- /dev/null +++ b/tests/crashes/133965.rs @@ -0,0 +1,9 @@ +//@ known-bug: #133965 +//@ needs-rustc-debug-assertions + +struct NonGeneric {} + +#[derive(Default)] +struct NonGeneric<'a, const N: usize> {} + +pub fn main() {} diff --git a/tests/crashes/133966.rs b/tests/crashes/133966.rs new file mode 100644 index 0000000000000..25a881ae99b4f --- /dev/null +++ b/tests/crashes/133966.rs @@ -0,0 +1,3 @@ +//@ known-bug: #133966 +pub struct Data([[&'static str]; 5_i32]); +const _: &'static Data = unsafe { &*(&[] as *const Data) }; diff --git a/tests/crashes/134005.rs b/tests/crashes/134005.rs new file mode 100644 index 0000000000000..c1f4c758a14ec --- /dev/null +++ b/tests/crashes/134005.rs @@ -0,0 +1,5 @@ +//@ known-bug: #134005 + +fn main() { + let _ = [std::ops::Add::add, std::ops::Mul::mul, main as fn(_, &_)]; +} diff --git a/tests/crashes/134061.rs b/tests/crashes/134061.rs new file mode 100644 index 0000000000000..e00eb7603fead --- /dev/null +++ b/tests/crashes/134061.rs @@ -0,0 +1,4 @@ +//@ known-bug: #134061 +//@ needs-rustc-debug-assertions + +const x: () = |&'a diff --git a/tests/crashes/134162.rs b/tests/crashes/134162.rs new file mode 100644 index 0000000000000..9e5a4a1cb0bf3 --- /dev/null +++ b/tests/crashes/134162.rs @@ -0,0 +1,8 @@ +//@ known-bug: #134162 + +fn main() { + struct X; + + let xs = [X, X, X]; + let eq = xs == [panic!("panic evaluated"); 2]; +} diff --git a/tests/crashes/134217.rs b/tests/crashes/134217.rs new file mode 100644 index 0000000000000..1b14c660e8b4c --- /dev/null +++ b/tests/crashes/134217.rs @@ -0,0 +1,9 @@ +//@ known-bug: #134217 + +impl std::ops::CoerceUnsized for A {} + +fn main() { + if let _ = true + && true + {} +}