Skip to content
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
13 changes: 13 additions & 0 deletions tests/crashes/149748.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//@ known-bug: #149748
//@ edition: 2024
//@ compile-flags: -Zmir-enable-passes=+Inline -Zmir-enable-passes=+ReferencePropagation -Zlint-mir

#![feature(gen_blocks)]
gen fn foo(z: i32) -> i32 {
yield z;
z;
}
pub fn main() {
let mut iter = foo(3);
assert_eq!(iter.next(), Some(3))
}
7 changes: 7 additions & 0 deletions tests/crashes/150040.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//@ known-bug: #150040

fn main() {
let [(ref a, b), x];
a = "";
b = 5;
}
12 changes: 12 additions & 0 deletions tests/crashes/150049.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//@ known-bug: #150049
#![feature(min_generic_const_args)]
#![feature(inherent_associated_types)]
struct Foo<'a> {
x: &'a (),
}

impl<'a> Foo<'a> {
fn foo(_: [u8; Foo::X]) { std::mem::transmute([4]) }
}

fn main() {}
8 changes: 8 additions & 0 deletions tests/crashes/150128.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//@ known-bug: #150128
fn main() {
match 0 {
_ => || (),
_ => || (),
_ => (|| ()) as unsafe fn,
};
}
14 changes: 14 additions & 0 deletions tests/crashes/150296.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//@ known-bug: #150296
#[derive(PartialEq)]
pub struct Thing<const N: usize>;

impl<const N: usize> Thing<N> {
const A: Self = Thing;
}

fn broken<const N: usize>(x: Thing<N>) {
match x {
<Thing<N>>::A => {}
_ => {}
}
}
13 changes: 13 additions & 0 deletions tests/crashes/150387.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//@ known-bug: #150387
#![feature(min_specialization)]
#![allow(dead_code)]

struct Thing<T>(T) where [T]: Sized;

impl<T> Drop for Thing<T> where [T]: Sized {
default fn drop(&mut self) {}
}
impl<T> Drop for Thing<T> where [T]: Sized {
fn drop(&mut self) {}
}
fn main() {}
26 changes: 26 additions & 0 deletions tests/crashes/150403.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//@ known-bug: #150403
#![feature(non_lifetime_binders)]

trait A {
type GAT<T>: A;
fn foo<T>(self, t: T) -> Self::GAT<T>
where
Self: Sized;
}

trait B: A where
for<T> Self::GAT<T>: B,
{
fn bar<T>(self) -> Self::GAT<T>
where
Self: Sized;

fn baz<T>(self, t: T) -> Self::GAT<T>
where
Self: Sized,
{
self.foo(t).bar()
}
}

fn main() {}
15 changes: 15 additions & 0 deletions tests/crashes/150517.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//@ known-bug: #150517
trait Stream {
type Item;
fn next(self) -> ();
}
impl Stream for &'a () {}
impl<'a, A> Stream for <&A as Stream>::Item {}
trait StreamExt {
fn f(self) -> ()
where
for<'b> &'b A: Stream,
{
self.next()
}
}
8 changes: 8 additions & 0 deletions tests/crashes/150545.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//@ known-bug: #150545
#![feature(non_lifetime_binders)]
trait Foo: for<T> Bar<T> {
type Item;
fn next(self) -> Self::Item;
}
trait Bar<T> {}
fn main() {}
12 changes: 12 additions & 0 deletions tests/crashes/150749.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//@ known-bug: #150749
#![feature(min_generic_const_args)]

trait CollectArray {
fn inner_array();
}
impl CollectArray for () {
fn inner_array() {
let temp_ptr: [(); Self];
}
}
fn main() {}
7 changes: 7 additions & 0 deletions tests/crashes/150969.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//@ known-bug: #150969
#![feature(generic_const_exprs)]
#![feature(min_generic_const_args)]

fn pass_enum<const N : usize, const M : usize = const {N}> {
pass_enum::<{None}>
}
16 changes: 16 additions & 0 deletions tests/crashes/151069.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//@ known-bug: #151069
trait Trait {
type Assoc2;
}
struct Bar;
impl Trait for Bar
where
<Bar as Trait>::Assoc2: Trait,
{
type Assoc2 = ();
}
struct Foo {
field: <Bar as Trait>::Assoc2,
}
static FOO2: &Foo = 0;
fn main() {}
Loading