ptal / oak

A typed parser generator embedded in Rust code for Parsing Expression Grammars
Apache License 2.0
142 stars 14 forks source link

[FIX] Fixing AST to make it compile on 1.16.0-nightly. #96

Closed goyox86 closed 7 years ago

goyox86 commented 7 years ago

Hi @ptal!

While I was compiling https://github.com/goyox86/bailey I found this:

goyox86@Bailey:~/Code/rust/oak|goyox86/1.16.0-nightly⚡ 
⇒  cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling partial v0.1.1
   Compiling oak v0.4.6 (file:///home/goyox86/Code/rust/oak)
error[E0308]: mismatched types
   --> src/liboak/ast.rs:142:54
    |
142 |       path.segments.last_mut().unwrap().parameters = generics_params;
    |                                                      ^^^^^^^^^^^^^^^ expected enum `std::option::Option`, found enum `syntax::ast::PathParameters`
    |
    = note: expected type `std::option::Option<syntax::ptr::P<syntax::ast::PathParameters>>`
    = note:    found type `syntax::ast::PathParameters`

error: aborting due to previous error

error: Could not compile `oak`.

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

This change fixes that! Regards

ptal commented 7 years ago

Thanks!