Skip to content

lrpar package error #633

@ltratt

Description

@ltratt

@ratmice I'm not sure I understand this one but cargo package fails on lrpar:

$ cargo package
   Packaging lrpar v0.14.2 (/home/ltratt/scratch/softdev/grmtools/lrpar)
    Updating crates.io index
    Packaged 14 files, 226.4KiB (53.8KiB compressed)
   Verifying lrpar v0.14.2 (/home/ltratt/scratch/softdev/grmtools/lrpar)
   Compiling lrpar v0.14.2 (/home/ltratt/scratch/softdev/grmtools/target/package/lrpar-0.14.2)
error[E0599]: no method named `prod_span` found for reference `&YaccGrammar<StorageT>` in the current scope
    --> src/lib/ctbuilder.rs:1525:32
     |
1525 |                 let span = grm.prod_span(pidx);
     |                                ^^^^^^^^^
     |
help: there is a method `prod_len` with a similar name
     |
1525 -                 let span = grm.prod_span(pidx);
1525 +                 let span = grm.prod_len(pidx);
     |

error[E0599]: no method named `action_span` found for reference `&YaccGrammar<StorageT>` in the current scope
    --> src/lib/ctbuilder.rs:1558:44
     |
1558 | ...                   let span = grm.action_span(pidx).unwrap();
     |                                      ^^^^^^^^^^^
     |
help: there is a method `action` with a similar name
     |
1558 -                             let span = grm.action_span(pidx).unwrap();
1558 +                             let span = grm.action(pidx).unwrap();
     |

error[E0308]: mismatched types
    --> src/lib/ctbuilder.rs:1560:58
     |
 266 |     StorageT: 'static + Debug + Hash + PrimInt + Encode + Unsigned,
     |     -------- expected this type parameter
...
1560 |                                 Span::new(span.start() + last + off + ...
     |                                                          ^^^^ expected type parameter `StorageT`, found `usize`
     |
     = note: expected type parameter `StorageT`
                          found type `usize`

error[E0308]: mismatched types
    --> src/lib/ctbuilder.rs:1560:65
     |
 266 |     StorageT: 'static + Debug + Hash + PrimInt + Encode + Unsigned,
     |     -------- expected this type parameter
...
1560 |                                 Span::new(span.start() + last + off + ...
     |                                                                 ^^^ expected type parameter `StorageT`, found `usize`
     |
     = note: expected type parameter `StorageT`
                          found type `usize`

error[E0308]: mismatched types
    --> src/lib/ctbuilder.rs:1560:71
     |
 266 |     StorageT: 'static + Debug + Hash + PrimInt + Encode + Unsigned,
     |     -------- expected this type parameter
...
1560 |                                 Span::new(span.start() + last + off + "$".len(), s...
     |                                                                       ^^^^^^^^^ expected type parameter `StorageT`, found `usize`
     |
     = note: expected type parameter `StorageT`
                          found type `usize`

Any ideas why? It doesn't happen on a simple cargo build which is why we probably missed it earlier.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions