Rocket Framework示例无法编译

时间:2018-06-23 07:26:04

标签: rust rust-rocket

我试图每晚安装Rust并编译Rocket的hello_world示例项目。我收到此错误:

error[E0599]: no associated item named `Lifetime`

error[E0599]: no associated item named `Lifetime` found for type `syntax::ast::GenericParam` in the current scope
  --> /Users/azwar/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket_codegen-0.3.13/src/decorators/derive_form.rs:30:25
   |
30 |                         GenericParam::Lifetime(ref def) => Some(def),
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated item not found in `syntax::ast::GenericParam`

我搜索了此错误,但是没有线程或文章介绍如何解决该错误。

这些是我的依赖项:

[dependencies]
rocket = "0.3.13"
rocket_codegen = "0.3.13"

我正在使用Rust rust version 1.28.0-nightly (cbc4c8380 2018-06-22)

1 个答案:

答案 0 :(得分:3)

您的问题是fixed in v0.3.14

将您的Cargo.toml更新为"0.3.14"。然后使用cargo update更新您的包装箱或直接指定包装:

cargo update -p rocket_codegen
cargo update -p rocket