goffrie / plex

a parser and lexer generator as a Rust procedural macro
Apache License 2.0
410 stars 28 forks source link

Can't compile with 1.21.0-nightly #22

Closed ghost closed 7 years ago

ghost commented 7 years ago

Dependencies all build fine, but plex itself fails with a bunch of rustc errors.

rustc --verbose output running rust 1.21.0-nightly on Linux 4.11.7-1-ARCH

   Compiling plex v0.0.3
     Running `rustc --crate-name plex /home/inori/.cargo/registry/src/github.com-1ecc6299db9ec823/plex-0.0.3/src/lib.rs --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C debuginfo=2 -C metadata=490a9b298919bdee -C extra-filename=-490a9b298919bdee --out-dir /home/inori/github/curie/target/debug/deps -L dependency=/home/inori/github/curie/target/debug/deps --extern redfa=/home/inori/github/curie/target/debug/deps/libredfa-883b8c377d7f163c.rlib --extern lalr=/home/inori/github/curie/target/debug/deps/liblalr-37a0030533b01d07.rlib --cap-lints allow`
error[E0425]: cannot find function `expr_is_simple_block` in module `classify`
   --> /home/inori/.cargo/registry/src/github.com-1ecc6299db9ec823/plex-0.0.3/src/lexer.rs:153:23
    |
153 |             classify::expr_is_simple_block(&*expr)
    |                       ^^^^^^^^^^^^^^^^^^^^ not found in `classify`

error[E0425]: cannot find function `mk_sp` in module `codemap`
   --> /home/inori/.cargo/registry/src/github.com-1ecc6299db9ec823/plex-0.0.3/src/parser.rs:519:33
    |
519 |             cx.item_fn(codemap::mk_sp(lo, hi), range_fn_id, vec![
    |                                 ^^^^^ not found in `codemap`

error[E0425]: cannot find function `mk_sp` in module `codemap`
   --> /home/inori/.cargo/registry/src/github.com-1ecc6299db9ec823/plex-0.0.3/src/parser.rs:585:44
    |
585 |                     Binding::Enum(codemap::mk_sp(lo, parser.prev_span.hi), pats)
    |                                            ^^^^^ not found in `codemap`

error[E0425]: cannot find function `expr_is_simple_block` in module `classify`
   --> /home/inori/.cargo/registry/src/github.com-1ecc6299db9ec823/plex-0.0.3/src/parser.rs:600:27
    |
600 |                 classify::expr_is_simple_block(&*expr)
    |                           ^^^^^^^^^^^^^^^^^^^^ not found in `classify`

error[E0425]: cannot find function `mk_sp` in module `codemap`
   --> /home/inori/.cargo/registry/src/github.com-1ecc6299db9ec823/plex-0.0.3/src/parser.rs:611:31
    |
611 |             let sp = codemap::mk_sp(lo, parser.prev_span.hi);
    |                               ^^^^^ not found in `codemap`

error[E0599]: no method named `eat_lifetime` found for type `syntax::parse::parser::Parser<'_>` in the current scope
   --> /home/inori/.cargo/registry/src/github.com-1ecc6299db9ec823/plex-0.0.3/src/lexer.rs:116:34
    |
116 |         if let Some(lt) = parser.eat_lifetime() {
    |                                  ^^^^^^^^^^^^

error[E0308]: mismatched types
   --> /home/inori/.cargo/registry/src/github.com-1ecc6299db9ec823/plex-0.0.3/src/lexer.rs:122:31
    |
122 |         cx.lifetime(DUMMY_SP, Symbol::gensym("text"))
    |                               ^^^^^^^^^^^^^^^^^^^^^^ expected struct `syntax::ast::Ident`, found struct `syntax::ast::Symbol`
    |
    = note: expected type `syntax::ast::Ident`
               found type `syntax::ast::Symbol`
    = help: here are some functions which might fulfill your needs:
            - .to_ident()

error[E0599]: no associated item named `RESTRICTION_STMT_EXPR` found for type `syntax::parse::parser::Restrictions` in the current scope
   --> /home/inori/.cargo/registry/src/github.com-1ecc6299db9ec823/plex-0.0.3/src/lexer.rs:150:47
    |
150 |         let expr = try!(parser.parse_expr_res(parser::Restrictions::RESTRICTION_STMT_EXPR, None));
    |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0063]: missing field `span` in initializer of `syntax::ast::WhereClause`
   --> /home/inori/.cargo/registry/src/github.com-1ecc6299db9ec823/plex-0.0.3/src/lexer.rs:237:27
    |
237 |             where_clause: ast::WhereClause {
    |                           ^^^^^^^^^^^^^^^^ missing `span`

error[E0063]: missing field `span` in initializer of `syntax::ast::WhereClause`
   --> /home/inori/.cargo/registry/src/github.com-1ecc6299db9ec823/plex-0.0.3/src/parser.rs:172:23
    |
172 |         where_clause: ast::WhereClause {
    |                       ^^^^^^^^^^^^^^^^ missing `span`

error[E0609]: no field `value` on type `syntax::ast::Attribute`
   --> /home/inori/.cargo/registry/src/github.com-1ecc6299db9ec823/plex-0.0.3/src/parser.rs:549:28
    |
549 |                 match attr.value.node {
    |                            ^^^^^ did you mean `style`?

error[E0609]: no field `value` on type `syntax::ast::Attribute`
   --> /home/inori/.cargo/registry/src/github.com-1ecc6299db9ec823/plex-0.0.3/src/parser.rs:550:65
    |
550 |                     ast::MetaItemKind::List(ref tokens) if attr.value.name == "no_reduce" => {
    |                                                                 ^^^^^ did you mean `style`?

error[E0609]: no field `value` on type `syntax::ast::Attribute`
   --> /home/inori/.cargo/registry/src/github.com-1ecc6299db9ec823/plex-0.0.3/src/parser.rs:561:53
    |
561 |                     ast::MetaItemKind::Word if attr.value.name == "overriding" => {
    |                                                     ^^^^^ did you mean `style`?

error[E0599]: no associated item named `RESTRICTION_STMT_EXPR` found for type `syntax::parse::parser::Restrictions` in the current scope
   --> /home/inori/.cargo/registry/src/github.com-1ecc6299db9ec823/plex-0.0.3/src/parser.rs:597:51
    |
597 |             let expr = try!(parser.parse_expr_res(parser::Restrictions::RESTRICTION_STMT_EXPR, None));
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 14 previous errors

error: Could not compile `plex`.

Caused by:
  process didn't exit successfully: `rustc --crate-name plex /home/inori/.cargo/registry/src/github.com-1ecc6299db9ec823/plex-0.0.3/src/lib.rs --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C debuginfo=2 -C metadata=490a9b298919bdee -C extra-filename=-490a9b298919bdee --out-dir /home/inori/github/curie/target/debug/deps -L dependency=/home/inori/github/curie/target/debug/deps --extern redfa=/home/inori/github/curie/target/debug/deps/libredfa-883b8c377d7f163c.rlib --extern lalr=/home/inori/github/curie/target/debug/deps/liblalr-37a0030533b01d07.rlib --cap-lints allow` (exit code: 101)
ghost commented 7 years ago

Using a git dependency in Cargo.toml knocks it down to four errors:

   Compiling plex v0.0.3 (https://github.com/goffrie/plex#4b7fab5f)
error[E0425]: cannot find function `expr_is_simple_block` in module `classify`
   --> /home/inori/.cargo/git/checkouts/plex-99281a3d5255642b/4b7fab5/src/lexer.rs:162:23
    |
162 |             classify::expr_is_simple_block(&*expr)
    |                       ^^^^^^^^^^^^^^^^^^^^ not found in `classify`

error[E0425]: cannot find function `expr_is_simple_block` in module `classify`
   --> /home/inori/.cargo/git/checkouts/plex-99281a3d5255642b/4b7fab5/src/parser.rs:623:27
    |
623 |                 classify::expr_is_simple_block(&*expr)
    |                           ^^^^^^^^^^^^^^^^^^^^ not found in `classify`

error[E0063]: missing field `span` in initializer of `syntax::ast::WhereClause`
   --> /home/inori/.cargo/git/checkouts/plex-99281a3d5255642b/4b7fab5/src/lexer.rs:246:27
    |
246 |             where_clause: ast::WhereClause {
    |                           ^^^^^^^^^^^^^^^^ missing `span`

error[E0063]: missing field `span` in initializer of `syntax::ast::WhereClause`
   --> /home/inori/.cargo/git/checkouts/plex-99281a3d5255642b/4b7fab5/src/parser.rs:172:23
    |
172 |         where_clause: ast::WhereClause {
    |                       ^^^^^^^^^^^^^^^^ missing `span`

error: aborting due to 4 previous errors

error: Could not compile `plex`.
goffrie commented 7 years ago

I've fixed the compile errors, but the example program still doesn't work because of some annoying macro stuff. I'll see if I can fix those for now too. I keep talking about it, but I really do need to rewrite this to use the new token-based proc macro system.

ghost commented 7 years ago

All green, thanks!