Skip to content

Instantly share code, notes, and snippets.

@JonathanBrouwer
Created June 7, 2024 11:53
Show Gist options
  • Save JonathanBrouwer/33d429eab435c266029b3a0828642760 to your computer and use it in GitHub Desktop.
Save JonathanBrouwer/33d429eab435c266029b3a0828642760 to your computer and use it in GitHub Desktop.
[jonathan@jonathan Prism]$ cargo build
Compiling serde v1.0.203
Compiling bincode v1.3.3
Compiling serde_json v1.0.117
Compiling prism-parser v0.1.0 (/home/jonathan/Projects/Prism/prism-parser)
error[E0282]: type annotations needed
--> prism-parser/src/parser/parser_rule_body.rs:126:18
|
126 | .parse(stream, cache, context);
| ^^^^^ cannot infer type
error[E0599]: no method named `parse` found for opaque type `impl Parser<'_, '_, cow::Cow<'_, ActionResult<'_, '_>>, _> + '_` in the current scope
--> prism-parser/src/parser/parser_rule_body.rs:126:18
|
125 | let mut res = parser_body_sub_annotations(rules, blocks, rest, expr, rule_args, vars)
| ___________________________-
126 | | .parse(stream, cache, context);
| | -^^^^^ method not found in `impl Parser<'_, '_, Cow<'_, ActionResult<'_, '_>>, _>`
| |_________________|
|
|
= help: items from traits can only be used if the trait is implemented and in scope
help: trait `Parser` which provides `parse` is implemented but not in scope; perhaps you want to import it
|
1 + use crate::core::parser::Parser;
|
error[E0282]: type annotations needed
--> prism-parser/src/parser/parser_rule_body.rs:138:89
|
138 | parser_body_sub_annotations(rules, blocks, rest, expr, rule_args, vars).parse(
| ^^^^^ cannot infer type
error[E0599]: no method named `parse` found for opaque type `impl Parser<'_, '_, cow::Cow<'_, ActionResult<'_, '_>>, _> + '_` in the current scope
--> prism-parser/src/parser/parser_rule_body.rs:138:89
|
138 | parser_body_sub_annotations(rules, blocks, rest, expr, rule_args, vars).parse(
| ------------------------------------------------------------------------^^^^^ method not found in `impl Parser<'_, '_, Cow<'_, ActionResult<'_, '_>>, _>`
|
= help: items from traits can only be used if the trait is implemented and in scope
help: trait `Parser` which provides `parse` is implemented but not in scope; perhaps you want to import it
|
1 + use crate::core::parser::Parser;
|
error[E0282]: type annotations needed
--> prism-parser/src/parser/parser_rule_body.rs:154:89
|
154 | parser_body_sub_annotations(rules, blocks, rest, expr, rule_args, vars).parse(
| ^^^^^ cannot infer type
error[E0599]: no method named `parse` found for opaque type `impl Parser<'_, '_, cow::Cow<'_, ActionResult<'_, '_>>, _> + '_` in the current scope
--> prism-parser/src/parser/parser_rule_body.rs:154:89
|
154 | parser_body_sub_annotations(rules, blocks, rest, expr, rule_args, vars).parse(
| ------------------------------------------------------------------------^^^^^ method not found in `impl Parser<'_, '_, Cow<'_, ActionResult<'_, '_>>, _>`
|
= help: items from traits can only be used if the trait is implemented and in scope
help: trait `Parser` which provides `parse` is implemented but not in scope; perhaps you want to import it
|
1 + use crate::core::parser::Parser;
|
error[E0282]: type annotations needed
--> prism-parser/src/parser/parser_rule_body.rs:167:89
|
167 | parser_body_sub_annotations(rules, blocks, rest, expr, rule_args, vars).parse(
| ^^^^^ cannot infer type
error[E0599]: no method named `parse` found for opaque type `impl Parser<'_, '_, cow::Cow<'_, ActionResult<'_, '_>>, _> + '_` in the current scope
--> prism-parser/src/parser/parser_rule_body.rs:167:89
|
167 | parser_body_sub_annotations(rules, blocks, rest, expr, rule_args, vars).parse(
| ------------------------------------------------------------------------^^^^^ method not found in `impl Parser<'_, '_, Cow<'_, ActionResult<'_, '_>>, _>`
|
= help: items from traits can only be used if the trait is implemented and in scope
help: trait `Parser` which provides `parse` is implemented but not in scope; perhaps you want to import it
|
1 + use crate::core::parser::Parser;
|
error[E0282]: type annotations needed
--> prism-parser/src/parser/parser_rule_body.rs:179:85
|
179 | parser_body_sub_annotations(rules, blocks, rest, expr, rule_args, vars).parse(
| ^^^^^ cannot infer type
error[E0599]: no method named `parse` found for opaque type `impl Parser<'_, '_, cow::Cow<'_, ActionResult<'_, '_>>, _> + '_` in the current scope
--> prism-parser/src/parser/parser_rule_body.rs:179:85
|
179 | parser_body_sub_annotations(rules, blocks, rest, expr, rule_args, vars).parse(
| ------------------------------------------------------------------------^^^^^ method not found in `impl Parser<'_, '_, Cow<'_, ActionResult<'_, '_>>, _>`
|
= help: items from traits can only be used if the trait is implemented and in scope
help: trait `Parser` which provides `parse` is implemented but not in scope; perhaps you want to import it
|
1 + use crate::core::parser::Parser;
|
error[E0282]: type annotations needed
--> prism-parser/src/parser/parser_rule_expr.rs:149:70
|
149 | parser_expr(rules, blocks, sub, rule_args, vars).parse(stream, cache, context);
| ^^^^^ cannot infer type
error[E0599]: no method named `parse` found for opaque type `impl Parser<'_, '_, PR<'_, '_>, _> + '_` in the current scope
--> prism-parser/src/parser/parser_rule_expr.rs:149:70
|
149 | parser_expr(rules, blocks, sub, rule_args, vars).parse(stream, cache, context);
| ^^^^^ method not found in `impl Parser<'_, '_, PR<'_, '_>, _>`
|
= help: items from traits can only be used if the trait is implemented and in scope
help: trait `Parser` which provides `parse` is implemented but not in scope; perhaps you want to import it
|
1 + use crate::core::parser::Parser;
|
error[E0282]: type annotations needed
--> prism-parser/src/parser/parser_rule_expr.rs:157:70
|
157 | parser_expr(rules, blocks, sub, rule_args, vars).parse(stream, cache, context);
| ^^^^^ cannot infer type
error[E0599]: no method named `parse` found for opaque type `impl Parser<'_, '_, PR<'_, '_>, _> + '_` in the current scope
--> prism-parser/src/parser/parser_rule_expr.rs:157:70
|
157 | parser_expr(rules, blocks, sub, rule_args, vars).parse(stream, cache, context);
| ^^^^^ method not found in `impl Parser<'_, '_, PR<'_, '_>, _>`
|
= help: items from traits can only be used if the trait is implemented and in scope
help: trait `Parser` which provides `parse` is implemented but not in scope; perhaps you want to import it
|
1 + use crate::core::parser::Parser;
|
error[E0282]: type annotations needed
--> prism-parser/src/parser/parser_rule_expr.rs:178:70
|
178 | parser_expr(rules, blocks, sub, rule_args, vars).parse(stream, cache, context);
| ^^^^^ cannot infer type
error[E0599]: no method named `parse` found for opaque type `impl Parser<'_, '_, PR<'_, '_>, _> + '_` in the current scope
--> prism-parser/src/parser/parser_rule_expr.rs:178:70
|
178 | parser_expr(rules, blocks, sub, rule_args, vars).parse(stream, cache, context);
| ^^^^^ method not found in `impl Parser<'_, '_, PR<'_, '_>, _>`
|
= help: items from traits can only be used if the trait is implemented and in scope
help: trait `Parser` which provides `parse` is implemented but not in scope; perhaps you want to import it
|
1 + use crate::core::parser::Parser;
|
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
error[E0391]: cycle detected when computing type of opaque `parser::parser_rule_expr::parser_expr::{opaque#0}`
--> prism-parser/src/parser/parser_rule_expr.rs:30:6
|
30 | ) -> impl Parser<'arn, 'grm, PR<'arn, 'grm>, E> + 'a {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: ...which requires type-checking `parser::parser_rule_expr::parser_expr`...
--> prism-parser/src/parser/parser_rule_expr.rs:149:21
|
149 | parser_expr(rules, blocks, sub, rule_args, vars).parse(stream, cache, context);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which requires evaluating trait selection obligation `parser::parser_rule_expr::parser_expr::{opaque#0}: core::marker::Unpin`...
= note: ...which again requires computing type of opaque `parser::parser_rule_expr::parser_expr::{opaque#0}`, completing the cycle
note: cycle used when computing type of `parser::parser_rule_expr::parser_expr::{opaque#0}`
--> prism-parser/src/parser/parser_rule_expr.rs:30:6
|
30 | ) -> impl Parser<'arn, 'grm, PR<'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
Some errors have detailed explanations: E0282, E0391, E0599.
For more information about an error, try `rustc --explain E0282`.
error: could not compile `prism-parser` (lib) due to 18 previous errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment