Closed
Description
The code in my hobby project Prism compiles on stable, but not on the latest nightly.
https://github.com/JonathanBrouwer/Prism/tree/222637a80cc2bb7794d0e4f649665fdd4ca23320
Sadly the codebase is quite large and I don't really see a good way to reduce it.
I ran cargo-bisect-rustc, which got the following output: (Which is a version bump commit, which confuses me)
searched nightlies: from nightly-2024-01-01 to nightly-2024-06-07
regressed nightly: nightly-2024-03-18
searched commit range: 766bdce...eb45c84
regressed commit: 4c1b9c3
The most interesting error that is returned on nightly is:
error[E0391]: cycle detected when computing type of opaque `parser::parser_rule_body::parser_body_sub_annotations::{opaque#0}`
--> prism-parser/src/parser/parser_rule_body.rs:122:6
|
122 | ) -> impl Parser<'arn, 'grm, Cow<'arn, ActionResult<'arn, 'grm>>, E> + 'a {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: ...which requires type-checking `parser::parser_rule_body::parser_body_sub_annotations`...
--> prism-parser/src/parser/parser_rule_body.rs:125:27
|
125 | let mut res = parser_body_sub_annotations(rules, blocks, rest, expr, rule_args, vars)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which requires evaluating trait selection obligation `parser::parser_rule_body::parser_body_sub_annotations::{opaque#0}: core::marker::Unpin`...
= note: ...which again requires computing type of opaque `parser::parser_rule_body::parser_body_sub_annotations::{opaque#0}`, completing the cycle
note: cycle used when computing type of `parser::parser_rule_body::parser_body_sub_annotations::{opaque#0}`
--> prism-parser/src/parser/parser_rule_body.rs:122:6
|
122 | ) -> impl Parser<'arn, 'grm, Cow<'arn, ActionResult<'arn, 'grm>>, E> + 'a {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
Though multiple errors are returned. The entire error log is:
https://gist.github.com/JonathanBrouwer/33d429eab435c266029b3a0828642760