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
22 changes: 22 additions & 0 deletions tests/crashes/126725.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//@ known-bug: #126725
type Indirect<T> = <T as Bar>::Output;

trait Foo {
fn foo<'a>() -> Indirect<&'a impl Sized>;
}

trait Bar {
type Output;
}

impl<'a> Bar for &'a () {
type Output = &'a i32;
}

impl Foo for () {
fn foo<'a>() -> <&'a Self as Bar>::Output {
&0
}
}

fn main() {}
9 changes: 9 additions & 0 deletions tests/crashes/141590.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//@ known-bug: #141590
use std::sync::OnceLock;

enum Void {}

static LAZY_INIT: Void = OnceLock::new();
static LAZY_INIT_REF: &[&Void] = &[&LAZY_INIT];

fn main() {}
7 changes: 7 additions & 0 deletions tests/crashes/142229.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//@ known-bug: #142229
#![feature(super_let)]

const _: *const i32 = {
super let x = 1;
&raw const x
};
6 changes: 6 additions & 0 deletions tests/crashes/145217.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//@ known-bug: #145217
//@ compile-flags: -Zlint-mir
#![feature(super_let)]
fn main() {
super let Some(1) = Some(2) else { return };
}
11 changes: 11 additions & 0 deletions tests/crashes/148094.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//@ known-bug: #148094
//@ compile-flags: -Zvalidate-mir
#![feature(type_alias_impl_trait)]
type Tait = impl Sized;
trait Foo: Bar<Tait> {}
trait Bar<T> {}
#[define_opaque(Tait)]
fn test_correct3(x: &dyn Foo) -> &dyn Bar<()> {
x
}
fn main() {}
11 changes: 11 additions & 0 deletions tests/crashes/148095.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//@ known-bug: #148095
use std::ops::Mul;

struct Quantity<S>(S);
impl<S> Mul<Quantity<<f32 as Mul<S>>::Output>> for f32
where
Quantity<Self::Output>:
{
type Output = ();
fn mul(self, _: Quantity<<f32 as Mul<S>>::Output>) {}
}
9 changes: 9 additions & 0 deletions tests/crashes/152410.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//@ known-bug: #152410
trait Trait {
fn foo(&self);
}
impl Trait for () {}

const OBJECT: *const (dyn Trait + Send) = &();

const _: *const dyn Send = OBJECT as _;
Loading