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

Build fails on nightly #1571

Closed
UgnilJoZ opened this issue Jul 11, 2019 · 3 comments
Closed

Build fails on nightly #1571

UgnilJoZ opened this issue Jul 11, 2019 · 3 comments

Comments

@UgnilJoZ
Copy link

UgnilJoZ commented Jul 11, 2019

Hi,

I am using rocket (which requires nightly) and cannot build serde_derive.

An example Cargo.toml:

[package]
name = "serde-error-test"
version = "0.1.0"
authors = ["Hello"]
edition = "2018"

[dependencies]
serde_derive = "1.0.94"

And here is the build error:
(Also happens on your CI: https://travis-ci.org/serde-rs/serde/jobs/557155415)

$ rustc --version
rustc 1.38.0-nightly (cd2cd4c96 2019-07-10)
$ cargo build
    Updating crates.io index
   Compiling proc-macro2 v0.4.30
   Compiling unicode-xid v0.1.0
   Compiling syn v0.15.39
   Compiling quote v0.6.13
   Compiling serde_derive v1.0.94
error[E0433]: failed to resolve: unresolved import
   --> /home/joz/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.94/src/internals/ast.rs:142:44
    |
142 |     variants: &'a Punctuated<syn::Variant, Token![,]>,
    |                                            ^^^^^^^^^
    |                                            |
    |                                            unresolved import
    |                                            help: a similar path exists: `syn::token`
    |
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0433]: failed to resolve: unresolved import
   --> /home/joz/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.94/src/internals/ast.rs:187:40
    |
187 |     fields: &'a Punctuated<syn::Field, Token![,]>,
    |                                        ^^^^^^^^^
    |                                        |
    |                                        unresolved import
    |                                        help: a similar path exists: `syn::token`
    |
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0433]: failed to resolve: unresolved import
    --> /home/joz/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.94/src/internals/attr.rs:1542:44
     |
1542 |     metas: &'a Punctuated<syn::NestedMeta, Token![,]>,
     |                                            ^^^^^^^^^
     |                                            |
     |                                            unresolved import
     |                                            help: a similar path exists: `syn::token`
     |
     = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0433]: failed to resolve: unresolved import
    --> /home/joz/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.94/src/internals/attr.rs:1586:44
     |
1586 |     items: &'a Punctuated<syn::NestedMeta, Token![,]>,
     |                                            ^^^^^^^^^
     |                                            |
     |                                            unresolved import
     |                                            help: a similar path exists: `syn::token`
     |
     = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0433]: failed to resolve: unresolved import
    --> /home/joz/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.94/src/internals/attr.rs:1594:44
     |
1594 |     items: &'a Punctuated<syn::NestedMeta, Token![,]>,
     |                                            ^^^^^^^^^
     |                                            |
     |                                            unresolved import
     |                                            help: a similar path exists: `syn::token`
     |
     = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0433]: failed to resolve: unresolved import
    --> /home/joz/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.94/src/internals/attr.rs:1602:41
     |
1602 |     items: &Punctuated<syn::NestedMeta, Token![,]>,
     |                                         ^^^^^^^^^
     |                                         |
     |                                         unresolved import
     |                                         help: a similar path exists: `syn::token`
     |
     = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0433]: failed to resolve: unresolved import
    --> /home/joz/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.94/src/internals/attr.rs:1702:56
     |
1702 |     struct BorrowedLifetimes(Punctuated<syn::Lifetime, Token![+]>);
     |                                                        ^^^^^^^^^
     |                                                        |
     |                                                        unresolved import
     |                                                        help: a similar path exists: `syn::token`
     |
     = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0433]: failed to resolve: unresolved import
   --> /home/joz/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.94/src/bound.rs:198:31
    |
198 |                 colon_token: <Token![:]>::default(),
    |                               ^^^^^^^^^
    |                               |
    |                               unresolved import
    |                               help: a similar path exists: `syn::token`
    |
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0433]: failed to resolve: unresolved import
   --> /home/joz/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.94/src/bound.rs:232:27
    |
232 |             colon_token: <Token![:]>::default(),
    |                           ^^^^^^^^^
    |                           |
    |                           unresolved import
    |                           help: a similar path exists: `syn::token`
    |
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0433]: failed to resolve: unresolved import
   --> /home/joz/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.94/src/bound.rs:289:36
    |
289 |                         lt_token: <Token![<]>::default(),
    |                                    ^^^^^^^^^
    |                                    |
    |                                    unresolved import
    |                                    help: a similar path exists: `syn::token`
    |
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0433]: failed to resolve: unresolved import
   --> /home/joz/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.94/src/bound.rs:309:36
    |
309 |                         gt_token: <Token![>]>::default(),
    |                                    ^^^^^^^^^
    |                                    |
    |                                    unresolved import
    |                                    help: a similar path exists: `syn::token`
    |
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0433]: failed to resolve: unresolved import
  --> /home/joz/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.94/src/fragment.rs:58:18
   |
58 |                 <Token![,]>::default().to_tokens(out);
   |                  ^^^^^^^^^
   |                  |
   |                  unresolved import
   |                  help: a similar path exists: `syn::token`
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to 12 previous errors

For more information about this error, try `rustc --explain E0433`.
error: Could not compile `serde_derive`.

To learn more, run the command again with --verbose.
@dtolnay
Copy link
Member

dtolnay commented Jul 11, 2019

This is a compiler bug: rust-lang/rust#62562. Please use an older compiler for now. The fix will be in tomorrow's nightly compiler.

@dtolnay dtolnay closed this as completed Jul 11, 2019
@UgnilJoZ
Copy link
Author

Thanks for the quick answer.

@ZhangZhuoSJTU
Copy link

Same error and thanks for the answer.

@dtolnay dtolnay pinned this issue Jul 11, 2019
@dtolnay dtolnay unpinned this issue Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants