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

rust-cssparser doesn't compile anymore, complaining about syn::Token! #62591

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

rust-cssparser doesn't compile anymore, complaining about syn::Token! #62591

Eijebong opened this issue Jul 11, 2019 · 3 comments

Comments

@Eijebong
Copy link
Contributor

The latest nightly doesn't compiler cssparser. The error message is the following:

error[E0433]: failed to resolve: unresolved import
  --> build/match_byte.rs:48:31
   |
48 |                 input.parse::<syn::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: aborting due to previous error

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

To learn more, run the command again with --verbose.

The macro does exist

I've seen this issue in serde_derive too (and I've been told it happens in phf)

@VictorKoenders
Copy link

cargo 1.38.0-nightly (677a180f4 2019-07-08)
release: 1.38.0
commit-hash: 677a180f4c8ca1dcef594f68dd0e63e4f08621f5
commit-date: 2019-07-08
rustc 1.38.0-nightly (cd2cd4c96 2019-07-10)
binary: rustc
commit-hash: cd2cd4c9627e52c33e68e8c93a8916dc11094cbb
commit-date: 2019-07-10
host: x86_64-unknown-linux-gnu
release: 1.38.0-nightly
LLVM version: 8.0

Cargo.toml

[package]
name = "test_"
version = "0.1.0"
authors = ["Trangar <victor.koenders@gmail.com>"]
edition = "2018"

[dependencies]
phf = { version = "0.7", features = ["macros"] }

Main.rs

fn main() {}
Output ``` Compiling phf_macros v0.7.24 error[E0433]: failed to resolve: maybe a missing `extern crate token;`? --> /home/trangar/.cargo/registry/src/github.com-1ecc6299db9ec823/phf_macros-0.7.24/src/lib.rs:146:23 | 146 | input.parse::]>()?; | ^^^^^^^^^^ maybe a missing `extern crate 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: maybe a missing extern crate token;?
--> /home/trangar/.cargo/registry/src/github.com-1ecc6299db9ec823/phf_macros-0.7.24/src/lib.rs:156:42
|
156 | let parsed = Punctuated::<Entry, Token![,]>::parse_terminated(input)?;
| ^^^^^^^^^ maybe a missing extern crate 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: maybe a missing extern crate token;?
--> /home/trangar/.cargo/registry/src/github.com-1ecc6299db9ec823/phf_macros-0.7.24/src/lib.rs:167:40
|
167 | let parsed = Punctuated::<Key, Token![,]>::parse_terminated(input)?;
| ^^^^^^^^^ maybe a missing extern crate 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[E0277]: the size for values of type [Entry] cannot be known at compilation time
--> /home/trangar/.cargo/registry/src/github.com-1ecc6299db9ec823/phf_macros-0.7.24/src/lib.rs:157:13
|
157 | let map = parsed.into_iter().collect::<Vec<_>>();
| ^^^ doesn't have a size known at compile-time
|
= help: the trait std::marker::Sized is not implemented for [Entry]
= note: to learn more, visit https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait
= note: all local variables must have a statically known size
= help: unsized locals are gated as an unstable feature

error[E0308]: mismatched types
--> /home/trangar/.cargo/registry/src/github.com-1ecc6299db9ec823/phf_macros-0.7.24/src/lib.rs:159:16
|
159 | Ok(Map(map))
| ^^^
| |
| expected struct std::vec::Vec, found slice
| help: try using a conversion method: map.to_vec()
|
= note: expected type std::vec::Vec<Entry>
found type [Entry]

error[E0277]: the size for values of type [Entry] cannot be known at compilation time
--> /home/trangar/.cargo/registry/src/github.com-1ecc6299db9ec823/phf_macros-0.7.24/src/lib.rs:168:13
|
168 | let set = parsed
| ^^^ doesn't have a size known at compile-time
|
= help: the trait std::marker::Sized is not implemented for [Entry]
= note: to learn more, visit https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait
= note: all local variables must have a statically known size
= help: unsized locals are gated as an unstable feature

error[E0308]: mismatched types
--> /home/trangar/.cargo/registry/src/github.com-1ecc6299db9ec823/phf_macros-0.7.24/src/lib.rs:176:16
|
176 | Ok(Set(set))
| ^^^
| |
| expected struct std::vec::Vec, found slice
| help: try using a conversion method: set.to_vec()
|
= note: expected type std::vec::Vec<Entry>
found type [Entry]

error: aborting due to 7 previous errors

Some errors have detailed explanations: E0277, E0308, E0433.
For more information about an error, try rustc --explain E0277.
error: Could not compile phf_macros.

To learn more, run the command again with --verbose.


</details>

@tesuji
Copy link
Contributor

tesuji commented Jul 11, 2019

Duplicate of #62562. Should be fixed by tomorrow nightly.

@Eijebong
Copy link
Contributor Author

Oh, thanks. For some reasons I couldn't find any issue with that. I'll close this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants