rocket-diesel-rest-api-example
rocket-diesel-rest-api-example copied to clipboard
Compile error
when I want to run this project i got this error :
rocket-diesel-rest-api-example git:(master) cargo build --release && cd target/release/
Compiling pear_codegen v0.0.14
Compiling hyper v0.10.13
Compiling serde_derive_internals v0.23.0
Compiling diesel v1.1.1
Compiling rayon v0.7.1
error[E0432]: unresolved import `syntax::ast::SpannedIdent`
--> /home/mehrdad/.cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.0.14/src/lib.rs:27:56
|
27 | use syntax::ast::{ItemKind, MetaItem, FnDecl, PatKind, SpannedIdent};
| ^^^^^^^^^^^^ no `SpannedIdent` in `ast`
error[E0609]: no field `identifier` on type `syntax::ast::PathSegment`
--> /home/mehrdad/.cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.0.14/src/lib.rs:131:59
|
131 | let penultimate = path.segments[num_segs - 2].identifier.name.as_str();
| ^^^^^^^^^^ unknown field
|
= note: available fields are: `ident`, `parameters`
error[E0609]: no field `identifier` on type `syntax::ast::PathSegment`
--> /home/mehrdad/.cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.0.14/src/lib.rs:138:48
|
138 | let last = path.segments[num_segs - 1].identifier.name.as_str();
| ^^^^^^^^^^ unknown field
|
= note: available fields are: `ident`, `parameters`
error[E0609]: no field `identifier` on type `syntax::ast::PathSegment`
--> /home/mehrdad/.cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.0.14/src/lib.rs:147:40
|
147 | let first_ident = path.segments[0].identifier.name.as_str();
| ^^^^^^^^^^ unknown field
|
= note: available fields are: `ident`, `parameters`
error[E0599]: no variant named `TupField` found for type `syntax::ast::ExprKind` in the current scope
--> /home/mehrdad/.cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.0.14/src/lib.rs:340:9
|
340 | ExprKind::TupField(indexed_expr, i) => {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ variant not found in `syntax::ast::ExprKind`
error[E0599]: no variant named `TupField` found for type `syntax::ast::ExprKind` in the current scope
--> /home/mehrdad/.cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.0.14/src/lib.rs:341:51
|
341 | let remake = |new_expr: Vec<P<Expr>>| ExprKind::TupField(new_expr[0].clone(), i);
| ^^^^^^^^^^^^^^^^^^ variant not found in `syntax::ast::ExprKind`
error: aborting due to 6 previous errors
Some errors occurred: E0432, E0599, E0609.
For more information about an error, try `rustc --explain E0432`.
error: Could not compile `pear_codegen`.
warning: build failed, waiting for other jobs to finish...
error: build failed
may please help me to fix it ?!
Yeah same issue as @mehrdaddolatkhah.
Here are my rust versions:
rustc --version rustc 1.32.0-nightly (0c999ed13 2018-12-03)
cargo --version cargo 1.32.0-nightly (b3d0b2e54 2018-11-15)
rustup --version rustup 1.15.0 (f0a3d9a84 2018-11-27)
Any ideas @sean3z?
I've really liked the article and I want to use it as base for a service I want to build.
I started to update the crates to the latest versions and tagged the project once the tutorial was converted. I've got it all working. Maybe you can look into 'my project' to see what I had to change.
See: https://gitlab.com/JeroenKnoops/bob-api/tree/0.0.1-hero
Versions used:
rustc --version rustc 1.37.0-nightly (5f3656ce9 2019-06-11)
cargo --version cargo 1.37.0-nightly (545f35425 2019-05-23)
rustup --version rustup 1.18.3 (435397f48 2019-05-22)