Rocket Framework 示例无法编译
Rocket Framework sample does not compile
我尝试每晚安装 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)
您的问题是 fixed in v0.3.14。
将您的 Cargo.toml
更新为 "0.3.14"
。然后使用 cargo update
更新您的包或直接指定包:
cargo update -p rocket_codegen
cargo update -p 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)
您的问题是 fixed in v0.3.14。
将您的 Cargo.toml
更新为 "0.3.14"
。然后使用 cargo update
更新您的包或直接指定包:
cargo update -p rocket_codegen
cargo update -p rocket