Skip to content

Commit fe52669

Browse files
authoredMay 7, 2022
Rollup merge of rust-lang#96801 - Aaron1011:coinductive-cycle-test, r=compiler-errors
Add regression test for rust-lang#96319
2 parents 24d1304 + 848028c commit fe52669

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// edition:2018
2+
// revisions: rpass1 rpass2
3+
4+
pub struct Stmt {
5+
pub stmt_type: StmtKind,
6+
#[cfg(rpass1)] pub stmt_tag: Option<LintTag>,
7+
#[cfg(rpass2)] pub renamed_tag: Option<LintTag>,
8+
}
9+
pub struct LintTag;
10+
pub enum StmtKind {
11+
If(If),
12+
Block(&'static str),
13+
Return(Return),
14+
}
15+
pub struct If {
16+
pub condition: Function,
17+
}
18+
pub struct Return {
19+
pub value: Function,
20+
}
21+
pub struct Function {
22+
pub parameters: Box<Stmt>,
23+
}
24+
pub fn start_late_pass(stmt_receiver: Box<Stmt>) {
25+
spawn(async { stmt_receiver });
26+
}
27+
28+
pub fn spawn<T>(_: T)
29+
where
30+
T: Send,
31+
{
32+
}
33+
34+
fn main() {}

0 commit comments

Comments
 (0)
Please sign in to comment.