Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Commit 606bc8f

Browse files
authored
Add some ICEs (#716)
1 parent b79cfc2 commit 606bc8f

File tree

5 files changed

+37
-0
lines changed

5 files changed

+37
-0
lines changed

ices/84073.rs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
use std::marker::PhantomData;
2+
3+
pub trait StatefulFuture<S> {}
4+
pub struct Never<T>(PhantomData<T>);
5+
impl<T> StatefulFuture<T> for Never<T> {}
6+
7+
pub struct RaceBuilder<F, S> {
8+
future: F,
9+
_phantom: PhantomData<S>,
10+
}
11+
12+
impl<T, F> RaceBuilder<T, F>
13+
where
14+
F: StatefulFuture<Option<T>>,
15+
{
16+
pub fn when(self) {}
17+
}
18+
19+
pub struct Race<T, R> {
20+
race: R,
21+
_phantom: PhantomData<T>,
22+
}
23+
24+
impl<T, R> Race<T, R>
25+
where
26+
R: Fn(RaceBuilder<T, Never<T>>),
27+
{
28+
pub fn new(race: R) {}
29+
}
30+
31+
fn main() {
32+
Race::new(|race| race.when());
33+
}

ices/84104.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#[i=i::<ښܖ<

ices/84108.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
static NONE: (AsRef<OsStr>, u8);

ices/84148.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fn f(t:for<>t?

ices/84149.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
trait C{async fn b(){fn a()}}

0 commit comments

Comments
 (0)