Skip to content

Commit 2fd11d0

Browse files
authored
Rollup merge of #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
2 parents 1b45dad + ee4cca8 commit 2fd11d0

File tree

5 files changed

+56
-0
lines changed

5 files changed

+56
-0
lines changed

tests/crashes/135122.rs

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//@ known-bug: #135122
2+
trait Add {
3+
type Output;
4+
fn add(_: (), _: Self::Output) {}
5+
}
6+
7+
trait IsSame<Lhs> {
8+
type Assoc;
9+
}
10+
11+
trait Data {
12+
type Elem;
13+
}
14+
15+
impl<B> IsSame<i16> for f32 where f32: IsSame<B, Assoc = B> {}
16+
17+
impl<A> Add for i64
18+
where
19+
f32: IsSame<A>,
20+
i8: Data<Elem = A>,
21+
{
22+
type Output = <f32 as IsSame<A>>::Assoc;
23+
fn add(_: Data, _: Self::Output) {}
24+
}

tests/crashes/135124.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//@ known-bug: #135124
2+
trait A {
3+
fn y(&self)
4+
{
5+
fn call() -> impl Sized {}
6+
self.fold(call());
7+
}
8+
fn fold(&self, &self._) {}
9+
}

tests/crashes/135128.rs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//@ known-bug: #135128
2+
//@ compile-flags: -Copt-level=1 --edition=2021
3+
4+
async fn return_str() -> str
5+
where
6+
str: Sized,
7+
{
8+
*"Sized".to_string().into_boxed_str()
9+
}
10+
fn main() {}

tests/crashes/135210.rs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//@ known-bug: #135210
2+
3+
#![feature(const_trait_impl)]
4+
const _: fn(&String) = |s| {
5+
&*s as &str;
6+
};
7+
8+
fn main() {}

tests/crashes/135341.rs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//@ known-bug: #135341
2+
type A<T> = B;
3+
type B = _;
4+
5+
pub fn main() {}

0 commit comments

Comments
 (0)