Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not compile pear_codegen #507

Closed
omern1 opened this issue Dec 18, 2017 · 4 comments
Closed

Could not compile pear_codegen #507

omern1 opened this issue Dec 18, 2017 · 4 comments
Labels
nightly breakage Breakage on the nightly channel only

Comments

@omern1
Copy link

omern1 commented Dec 18, 2017

Building a Rocket based project fails with the following error. Cargo.lock shows pear_codegen is required by Rocket.

Rocket v3.3.4
MacOS 10.13.2
rustc 1.24.0-nightly (dc39c3169 2017-12-17)

...
error[E0599]: no method named `unwrap` found for type `syntax::ptr::P<syntax::ast::Item>` in the current scope
  --> /Users/nabeelomer/.cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.0.10/src/lib.rs:72:45
   |
72 |             let mut new_item = item.clone().unwrap();
   |                                             ^^^^^^

   Compiling lru-cache v0.1.1
error[E0599]: no method named `unwrap` found for type `syntax::ptr::P<syntax::ast::Expr>` in the current scope
   --> /Users/nabeelomer/.cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.0.10/src/lib.rs:174:40
    |
174 |     let mut param_expr = param.clone().unwrap();
    |                                        ^^^^^^

error[E0599]: no method named `unwrap` found for type `syntax::ptr::P<syntax::ast::Expr>` in the current scope
   --> /Users/nabeelomer/.cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.0.10/src/lib.rs:228:37
    |
228 |     let mut new_expr = expr.clone().unwrap();
    |                                     ^^^^^^

error[E0599]: no method named `unwrap` found for type `syntax::ptr::P<syntax::ast::Expr>` in the current scope
   --> /Users/nabeelomer/.cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.0.10/src/lib.rs:250:43
    |
250 |     let mut unwrapped_expr = expr.clone().unwrap();
    |                                           ^^^^^^

error[E0599]: no method named `unwrap` found for type `syntax::ptr::P<syntax::ast::Block>` in the current scope
   --> /Users/nabeelomer/.cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.0.10/src/lib.rs:345:71
    |
345 |             let new_block = gen_stmt(ecx, input, VecDeque::from(block.unwrap().stmts));
    |                                                                       ^^^^^^

error[E0599]: no method named `unwrap` found for type `syntax::ptr::P<syntax::ast::Block>` in the current scope
   --> /Users/nabeelomer/.cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.0.10/src/lib.rs:357:76
    |
357 |             let new_block = gen_stmt(ecx, input, VecDeque::from(true_block.unwrap().stmts));
    |                                                                            ^^^^^^

error[E0599]: no method named `unwrap` found for type `syntax::ptr::P<(syntax::codemap::Spanned<syntax::ast::Mac_>, syntax::ast::MacStmtStyle, syntax::util::ThinVec<syntax::ast::Attribute>)>` in the current scope
   --> /Users/nabeelomer/.cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.0.10/src/lib.rs:429:32
    |
429 |             let mac = mac_stmt.unwrap().0;
    |                                ^^^^^^

error: aborting due to 7 previous errors

error: Could not compile `pear_codegen`.
warning: build failed, waiting for other jobs to finish...
error: build failed
@SergioBenitez SergioBenitez added the nightly breakage Breakage on the nightly channel only label Dec 18, 2017
@SergioBenitez
Copy link
Member

This is due to a breaking change in the latest nightly. A new release will be posted as soon as possible that fixes this issue. Until then, please use nightly-2017-12-16.

@omern1
Copy link
Author

omern1 commented Dec 18, 2017

@SergioBenitez thanks!

@SergioBenitez
Copy link
Member

Fixed in Rocket v0.3.5.

@Asone
Copy link

Asone commented Dec 25, 2018

Hi @SergioBenitez, i don't know if this could be considered as related but it looks like we have a similar issue lately for which i opened an issue here so i referenced this issue in the linked issue.

Any tip would be welcome so we can fix the bug. Thanks a lot !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nightly breakage Breakage on the nightly channel only
Projects
None yet
Development

No branches or pull requests

3 participants