goffrie / plex

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

Won't build on Rust 1.19.0-nightly #21

Closed Addisonbean closed 7 years ago

Addisonbean commented 7 years ago

When running cargo build, I get these errors:

    Compiling plex v0.0.3 (file:///Users/addisonbean/git/other/plex)
 error[E0560]: struct `syntax::ast::Lifetime` has no field named `name`
    --> src/lexer.rs:122:21
     |
 122 |                     name: ident.name
     |                     ^^^^^ `syntax::ast::Lifetime` does not have this field

 error[E0308]: mismatched types
    --> src/lexer.rs:131:31
     |
 131 |         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: no associated item named `RESTRICTION_STMT_EXPR` found for type `syntax::parse::parser::Restrictions` in the current scope
    --> src/lexer.rs:159:47
     |
 159 |         let expr = try!(parser.parse_expr_res(parser::Restrictions::RESTRICTION_STMT_EXPR, None));
     |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

 error: no associated item named `RESTRICTION_STMT_EXPR` found for type `syntax::parse::parser::Restrictions` in the current scope
    --> src/parser.rs:620:51
     |
 620 |             let expr = try!(parser.parse_expr_res(parser::Restrictions::RESTRICTION_STMT_EXPR, None));
     |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

 error: aborting due to previous error(s)

 error: Could not compile `plex`.

 To learn more, run the command again with --verbose.

I am on macOS 10.12.4, using Rust 1.19.0-nightly.

goffrie commented 7 years ago

Thanks for the report! Should be fixed now. Hopefully the new procedural macro stuff will land soon, to get rid of the churn...

On Tue, May 30, 2017 at 12:54 PM, Addison Bean notifications@github.com wrote:

When running cargo build, I get these errors:

Compiling plex v0.0.3 (file:///Users/addisonbean/git/other/plex)

error[E0560]: struct syntax::ast::Lifetime has no field named name --> src/lexer.rs:122:21 | 122 | name: ident.name | ^^^^^ syntax::ast::Lifetime does not have this field

error[E0308]: mismatched types --> src/lexer.rs:131:31 131 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: no associated item named RESTRICTION_STMT_EXPR found for type syntax::parse::parser::Restrictions in the current scope --> src/lexer.rs:159:47 | 159 | let expr = try!(parser.parse_expr_res(parser::Restrictions::RESTRICTION_STMT_EXPR, None)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: no associated item named RESTRICTION_STMT_EXPR found for type syntax::parse::parser::Restrictions in the current scope --> src/parser.rs:620:51 | 620 | let expr = try!(parser.parse_expr_res(parser::Restrictions::RESTRICTION_STMT_EXPR, None)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error(s)

error: Could not compile plex.

To learn more, run the command again with --verbose.

I am on macOS 10.12.4, using Rust 1.19.0-nightly.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/goffrie/plex/issues/21, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLtTjSzsPGAmkWa5MoQEI94hQcEPc1eks5r_EnPgaJpZM4NqkZi .

-- Segmentation fault

Addisonbean commented 7 years ago

That was fast, thanks!