Skip to content

Commit 200c65f

Browse files
authored
Unrolled build for #158519
Rollup merge of #158519 - cyrgani:testing-2, r=Kivooeo add crashtests [2/N] Followup to #158290.
2 parents b4486ca + e87b275 commit 200c65f

12 files changed

Lines changed: 151 additions & 0 deletions

File tree

tests/crashes/149748.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//@ known-bug: #149748
2+
//@ edition: 2024
3+
//@ compile-flags: -Zmir-enable-passes=+Inline -Zmir-enable-passes=+ReferencePropagation -Zlint-mir
4+
5+
#![feature(gen_blocks)]
6+
gen fn foo(z: i32) -> i32 {
7+
yield z;
8+
z;
9+
}
10+
pub fn main() {
11+
let mut iter = foo(3);
12+
assert_eq!(iter.next(), Some(3))
13+
}

tests/crashes/150040.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//@ known-bug: #150040
2+
3+
fn main() {
4+
let [(ref a, b), x];
5+
a = "";
6+
b = 5;
7+
}

tests/crashes/150049.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//@ known-bug: #150049
2+
#![feature(min_generic_const_args)]
3+
#![feature(inherent_associated_types)]
4+
struct Foo<'a> {
5+
x: &'a (),
6+
}
7+
8+
impl<'a> Foo<'a> {
9+
fn foo(_: [u8; Foo::X]) { std::mem::transmute([4]) }
10+
}
11+
12+
fn main() {}

tests/crashes/150128.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//@ known-bug: #150128
2+
fn main() {
3+
match 0 {
4+
_ => || (),
5+
_ => || (),
6+
_ => (|| ()) as unsafe fn,
7+
};
8+
}

tests/crashes/150296.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//@ known-bug: #150296
2+
#[derive(PartialEq)]
3+
pub struct Thing<const N: usize>;
4+
5+
impl<const N: usize> Thing<N> {
6+
const A: Self = Thing;
7+
}
8+
9+
fn broken<const N: usize>(x: Thing<N>) {
10+
match x {
11+
<Thing<N>>::A => {}
12+
_ => {}
13+
}
14+
}

tests/crashes/150387.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//@ known-bug: #150387
2+
#![feature(min_specialization)]
3+
#![allow(dead_code)]
4+
5+
struct Thing<T>(T) where [T]: Sized;
6+
7+
impl<T> Drop for Thing<T> where [T]: Sized {
8+
default fn drop(&mut self) {}
9+
}
10+
impl<T> Drop for Thing<T> where [T]: Sized {
11+
fn drop(&mut self) {}
12+
}
13+
fn main() {}

tests/crashes/150403.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//@ known-bug: #150403
2+
#![feature(non_lifetime_binders)]
3+
4+
trait A {
5+
type GAT<T>: A;
6+
fn foo<T>(self, t: T) -> Self::GAT<T>
7+
where
8+
Self: Sized;
9+
}
10+
11+
trait B: A where
12+
for<T> Self::GAT<T>: B,
13+
{
14+
fn bar<T>(self) -> Self::GAT<T>
15+
where
16+
Self: Sized;
17+
18+
fn baz<T>(self, t: T) -> Self::GAT<T>
19+
where
20+
Self: Sized,
21+
{
22+
self.foo(t).bar()
23+
}
24+
}
25+
26+
fn main() {}

tests/crashes/150517.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//@ known-bug: #150517
2+
trait Stream {
3+
type Item;
4+
fn next(self) -> ();
5+
}
6+
impl Stream for &'a () {}
7+
impl<'a, A> Stream for <&A as Stream>::Item {}
8+
trait StreamExt {
9+
fn f(self) -> ()
10+
where
11+
for<'b> &'b A: Stream,
12+
{
13+
self.next()
14+
}
15+
}

tests/crashes/150545.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//@ known-bug: #150545
2+
#![feature(non_lifetime_binders)]
3+
trait Foo: for<T> Bar<T> {
4+
type Item;
5+
fn next(self) -> Self::Item;
6+
}
7+
trait Bar<T> {}
8+
fn main() {}

tests/crashes/150749.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//@ known-bug: #150749
2+
#![feature(min_generic_const_args)]
3+
4+
trait CollectArray {
5+
fn inner_array();
6+
}
7+
impl CollectArray for () {
8+
fn inner_array() {
9+
let temp_ptr: [(); Self];
10+
}
11+
}
12+
fn main() {}

0 commit comments

Comments
 (0)