diff --git a/tests/crashes/135122.rs b/tests/crashes/135122.rs new file mode 100644 index 0000000000000..77d943f23b47e --- /dev/null +++ b/tests/crashes/135122.rs @@ -0,0 +1,24 @@ +//@ known-bug: #135122 +trait Add { + type Output; + fn add(_: (), _: Self::Output) {} +} + +trait IsSame { + type Assoc; +} + +trait Data { + type Elem; +} + +impl IsSame for f32 where f32: IsSame {} + +impl Add for i64 +where + f32: IsSame, + i8: Data, +{ + type Output = >::Assoc; + fn add(_: Data, _: Self::Output) {} +} diff --git a/tests/crashes/135124.rs b/tests/crashes/135124.rs new file mode 100644 index 0000000000000..d6655cb46fac2 --- /dev/null +++ b/tests/crashes/135124.rs @@ -0,0 +1,9 @@ +//@ known-bug: #135124 +trait A { + fn y(&self) + { + fn call() -> impl Sized {} + self.fold(call()); + } + fn fold(&self, &self._) {} +} diff --git a/tests/crashes/135128.rs b/tests/crashes/135128.rs new file mode 100644 index 0000000000000..2ce17df824a0c --- /dev/null +++ b/tests/crashes/135128.rs @@ -0,0 +1,10 @@ +//@ known-bug: #135128 +//@ compile-flags: -Copt-level=1 --edition=2021 + +async fn return_str() -> str +where + str: Sized, +{ + *"Sized".to_string().into_boxed_str() +} +fn main() {} diff --git a/tests/crashes/135210.rs b/tests/crashes/135210.rs new file mode 100644 index 0000000000000..acb61e21090d2 --- /dev/null +++ b/tests/crashes/135210.rs @@ -0,0 +1,8 @@ +//@ known-bug: #135210 + +#![feature(const_trait_impl)] +const _: fn(&String) = |s| { + &*s as &str; +}; + +fn main() {} diff --git a/tests/crashes/135341.rs b/tests/crashes/135341.rs new file mode 100644 index 0000000000000..0e33242a5f5a0 --- /dev/null +++ b/tests/crashes/135341.rs @@ -0,0 +1,5 @@ +//@ known-bug: #135341 +type A = B; +type B = _; + +pub fn main() {}