Skip to content

add more crash tests #135398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions tests/crashes/135122.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//@ known-bug: #135122
trait Add {
type Output;
fn add(_: (), _: Self::Output) {}
}

trait IsSame<Lhs> {
type Assoc;
}

trait Data {
type Elem;
}

impl<B> IsSame<i16> for f32 where f32: IsSame<B, Assoc = B> {}

impl<A> Add for i64
where
f32: IsSame<A>,
i8: Data<Elem = A>,
{
type Output = <f32 as IsSame<A>>::Assoc;
fn add(_: Data, _: Self::Output) {}
}
9 changes: 9 additions & 0 deletions tests/crashes/135124.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//@ known-bug: #135124
trait A {
fn y(&self)
{
fn call() -> impl Sized {}
self.fold(call());
}
fn fold(&self, &self._) {}
}
10 changes: 10 additions & 0 deletions tests/crashes/135128.rs
Original file line number Diff line number Diff line change
@@ -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() {}
8 changes: 8 additions & 0 deletions tests/crashes/135210.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//@ known-bug: #135210

#![feature(const_trait_impl)]
const _: fn(&String) = |s| {
&*s as &str;
};

fn main() {}
5 changes: 5 additions & 0 deletions tests/crashes/135341.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//@ known-bug: #135341
type A<T> = B;
type B = _;

pub fn main() {}
Loading