add crashtests for several old unfixed ICEs
This commit is contained in:
parent
0d634185df
commit
fff063ee77
8
tests/crashes/117460.rs
Normal file
8
tests/crashes/117460.rs
Normal file
@ -0,0 +1,8 @@
|
||||
//@ known-bug: #117460
|
||||
#![feature(generic_const_exprs)]
|
||||
|
||||
struct Matrix<D = [(); 2 + 2]> {
|
||||
d: D,
|
||||
}
|
||||
|
||||
impl Matrix {}
|
48
tests/crashes/119095.rs
Normal file
48
tests/crashes/119095.rs
Normal file
@ -0,0 +1,48 @@
|
||||
//@ known-bug: #119095
|
||||
//@ compile-flags: --edition=2021
|
||||
|
||||
fn any<T>() -> T {
|
||||
loop {}
|
||||
}
|
||||
|
||||
trait Acquire {
|
||||
type Connection;
|
||||
}
|
||||
|
||||
impl Acquire for &'static () {
|
||||
type Connection = ();
|
||||
}
|
||||
|
||||
trait Unit {}
|
||||
impl Unit for () {}
|
||||
|
||||
fn get_connection<T>() -> impl Unit
|
||||
where
|
||||
T: Acquire,
|
||||
T::Connection: Unit,
|
||||
{
|
||||
any::<T::Connection>()
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let future = async { async { get_connection::<&'static ()>() }.await };
|
||||
|
||||
future.resolve_me();
|
||||
}
|
||||
|
||||
trait ResolveMe {
|
||||
fn resolve_me(self);
|
||||
}
|
||||
|
||||
impl<S> ResolveMe for S
|
||||
where
|
||||
(): CheckSend<S>,
|
||||
{
|
||||
fn resolve_me(self) {}
|
||||
}
|
||||
|
||||
trait CheckSend<F> {}
|
||||
impl<F> CheckSend<F> for () where F: Send {}
|
||||
|
||||
trait NeverImplemented {}
|
||||
impl<E, F> CheckSend<F> for E where E: NeverImplemented {}
|
15
tests/crashes/126443.rs
Normal file
15
tests/crashes/126443.rs
Normal file
@ -0,0 +1,15 @@
|
||||
//@ known-bug: #126443
|
||||
//@ compile-flags: -Copt-level=0
|
||||
#![feature(generic_const_exprs)]
|
||||
|
||||
fn double_up<const M: usize>() -> [(); M * 2] {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn quadruple_up<const N: usize>() -> [(); N * 2 * 2] {
|
||||
double_up()
|
||||
}
|
||||
|
||||
fn main() {
|
||||
quadruple_up::<0>();
|
||||
}
|
6
tests/crashes/128097.rs
Normal file
6
tests/crashes/128097.rs
Normal file
@ -0,0 +1,6 @@
|
||||
//@ known-bug: #128097
|
||||
#![feature(explicit_tail_calls)]
|
||||
fn f(x: &mut ()) {
|
||||
let _y: String;
|
||||
become f(x);
|
||||
}
|
Loading…
Reference in New Issue
Block a user