-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add crashtests for several old unfixed ICEs
- Loading branch information
Showing
4 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//@ known-bug: #117460 | ||
#![feature(generic_const_exprs)] | ||
|
||
struct Matrix<D = [(); 2 + 2]> { | ||
d: D, | ||
} | ||
|
||
impl Matrix {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//@ known-bug: #128097 | ||
#![feature(explicit_tail_calls)] | ||
fn f(x: &mut ()) { | ||
let _y: String; | ||
become f(x); | ||
} |