diff options
| author | Michael Goulet <michael@errs.io> | 2022-05-06 20:49:37 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-06 20:49:37 -0700 |
| commit | fe526695d1b274921e6df2b13e19035bb9a46742 (patch) | |
| tree | 0ea9092c0558f1f62655db31e604602e937054e0 | |
| parent | 24d1304e5e8b00b2c10ca3c1677e0992ff817292 (diff) | |
| parent | 848028c0a7bfc5e8d507e927b8114313037931a7 (diff) | |
| download | rust-fe526695d1b274921e6df2b13e19035bb9a46742.tar.gz rust-fe526695d1b274921e6df2b13e19035bb9a46742.zip | |
Rollup merge of #96801 - Aaron1011:coinductive-cycle-test, r=compiler-errors
Add regression test for #96319
| -rw-r--r-- | src/test/incremental/issue-96319-coinductive-cycle.rs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/test/incremental/issue-96319-coinductive-cycle.rs b/src/test/incremental/issue-96319-coinductive-cycle.rs new file mode 100644 index 00000000000..b5ff9112a20 --- /dev/null +++ b/src/test/incremental/issue-96319-coinductive-cycle.rs @@ -0,0 +1,34 @@ +// edition:2018 +// revisions: rpass1 rpass2 + +pub struct Stmt { + pub stmt_type: StmtKind, + #[cfg(rpass1)] pub stmt_tag: Option<LintTag>, + #[cfg(rpass2)] pub renamed_tag: Option<LintTag>, +} +pub struct LintTag; +pub enum StmtKind { + If(If), + Block(&'static str), + Return(Return), +} +pub struct If { + pub condition: Function, +} +pub struct Return { + pub value: Function, +} +pub struct Function { + pub parameters: Box<Stmt>, +} +pub fn start_late_pass(stmt_receiver: Box<Stmt>) { + spawn(async { stmt_receiver }); +} + +pub fn spawn<T>(_: T) +where + T: Send, +{ +} + +fn main() {} |
