Skip to content

Commit

Permalink
Unrolled build for rust-lang#135398
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#135398 - matthiaskrgr:crash, r=lqd

add more crash tests

try-job: aarch64-apple
try-job: x86_64-msvc
try-job: x86_64-gnu
try-job: dist-i586-gnu-i586-i686-musl
  • Loading branch information
rust-timer authored Jan 12, 2025
2 parents c0f6a1c + ee4cca8 commit df18a9f
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 0 deletions.
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() {}

0 comments on commit df18a9f

Please sign in to comment.