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

Compile failed with nightly-2018-04-08-i686-pc-windows-gnu. #19

Closed
zoumi opened this issue Apr 21, 2018 · 3 comments
Closed

Compile failed with nightly-2018-04-08-i686-pc-windows-gnu. #19

zoumi opened this issue Apr 21, 2018 · 3 comments
Assignees

Comments

@zoumi
Copy link

zoumi commented Apr 21, 2018

error[E0432]: unresolved import `proc_macro::TokenNode`
  --> E:\rustdir\registry\src\mirrors.xx.com-27933024a10d4e91\data-encoding-macro-internal-0.1.1\src\lib.rs:22:27
   |
22 | use proc_macro::{Spacing, TokenNode, TokenStream, TokenTree, TokenTreeIter};
   |                           ^^^^^^^^^ no `TokenNode` in the root. Did you mean to use `TokenTree`?

error[E0432]: unresolved import `proc_macro::TokenTreeIter`
  --> E:\rustdir\registry\src\mirrors.xx.com-27933024a10d4e91\data-encoding-macro-internal-0.1.1\src\lib.rs:22:62
   |
22 | use proc_macro::{Spacing, TokenNode, TokenStream, TokenTree, TokenTreeIter};
   |                                                              ^^^^^^^^^^^^^ no `TokenTreeIter` in the root. Did you mean to use `TokenTree`?

   Compiling libflate v0.1.14
error[E0574]: expected struct, variant or union type, found enum `TokenTree`
  --> E:\rustdir\registry\src\mirrors.xx.com-27933024a10d4e91\data-encoding-macro-internal-0.1.1\src\lib.rs:34:14
   |
34 |         Some(TokenTree { span: _, kind: TokenNode::Op(x, Spacing::Alone) })
   |              ^^^^^^^^^ not a struct, variant or union type

error[E0432]: unresolved import `syntax::ast::SpannedIdent`
  --> E:\rustdir\registry\src\mirrors.xx.com-27933024a10d4e91\pear_codegen-0.0.12\src\lib.rs:27:56
   |
27 | use syntax::ast::{ItemKind, MetaItem, FnDecl, PatKind, SpannedIdent};
   |                                                        ^^^^^^^^^^^^ no `SpannedIdent` in `ast`

   Compiling flate2 v1.0.1
error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
  --> E:\rustdir\registry\src\mirrors.xx.com-27933024a10d4e91\data-encoding-macro-internal-0.1.1\src\lib.rs:52:13
   |
52 |         let key = match key.kind {
   |             ^^^ `str` does not have a constant size known at compile-time
   |
   = help: the trait `std::marker::Sized` is not implemented for `str`
   = note: all local variables must have a statically known size

error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
  --> E:\rustdir\registry\src\mirrors.xx.com-27933024a10d4e91\data-encoding-macro-internal-0.1.1\src\lib.rs:58:21
   |
58 |             None => panic!("expected value for {}", key),
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `str` does not have a constant size known at compile-time
   |
   = help: the trait `std::marker::Sized` is not implemented for `str`
   = note: required by `std::fmt::ArgumentV1::new`
   = 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 trait bound `str: std::marker::Sized` is not satisfied
  --> E:\rustdir\registry\src\mirrors.xx.com-27933024a10d4e91\data-encoding-macro-internal-0.1.1\src\lib.rs:62:21
   |
62 |         let _ = map.insert(key, value);
   |                     ^^^^^^ `str` does not have a constant size known at compile-time
   |
   = help: the trait `std::marker::Sized` is not implemented for `str`

error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
  --> E:\rustdir\registry\src\mirrors.xx.com-27933024a10d4e91\data-encoding-macro-internal-0.1.1\src\lib.rs:50:19
   |
50 |     let mut map = HashMap::new();
   |                   ^^^^^^^^^^^^ `str` does not have a constant size known at compile-time
   |
   = help: the trait `std::marker::Sized` is not implemented for `str`
   = note: required by `<std::collections::HashMap<K, V>>::new`

error: aborting due to 7 previous errors

Some errors occurred: E0277, E0432, E0574.
For more information about an error, try `rustc --explain E0277`.
error[E0609]: no field `identifier` on type `syntax::ast::PathSegment`
   --> E:\rustdir\registry\src\mirrors.xx.com-27933024a10d4e91\pear_codegen-0.0.12\src\lib.rs:136:59
    |
136 |             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`
   --> E:\rustdir\registry\src\mirrors.xx.com-27933024a10d4e91\pear_codegen-0.0.12\src\lib.rs:143:48
    |
143 |         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`
   --> E:\rustdir\registry\src\mirrors.xx.com-27933024a10d4e91\pear_codegen-0.0.12\src\lib.rs:152:40
    |
152 |     let first_ident = path.segments[0].identifier.name.as_str();
    |                                        ^^^^^^^^^^ unknown field
    |
    = note: available fields are: `ident`, `parameters`

error: aborting due to 4 previous errors

Some errors occurred: E0432, E0609.
For more information about an error, try `rustc --explain E0432`.
error: Could not compile `data-encoding-macro-internal`.
warning: build failed, waiting for other jobs to finish...
error: Could not compile `pear_codegen`.
warning: build failed, waiting for other jobs to finish...
error: build failed
@ia0
Copy link
Owner

ia0 commented Apr 21, 2018

Hi @zoumi,

Thanks for your bug report! I'll try to fix it this week-end if I get the time, but it might take quite some time. Is this blocking?

Also, could you provide me with more contextual information? What are you building and with which command-line?

You theoretically should not get this error for the following reasons:

  • You should not build data-encoding-macro-internal directly. Instead you should use data-encoding-macro.
  • You probably use cargo build --no-default-features when building data-encoding-macro. If this is the case a simple workaround would be to use cargo build (or cargo build --features=stable to be explicit) until this issue is fixed.

Thanks again!

@zoumi
Copy link
Author

zoumi commented Apr 22, 2018

@ia0 Thank you for responding so quickly!
I'm building a library depends on data-encoding and data-encoding-macro.
Here is the configure in my Cargo.toml:

data-encoding = "^2.1"
data-encoding-macro = { version = "^0.1", default-features = false }

I was trying to test your bug fix just now. But unluckily, my library also depend on rand 0.5 which build failed too. I will fallback my rust to nightly 1.26.

@ia0
Copy link
Owner

ia0 commented Apr 22, 2018

Thanks for the additional information! It makes a lot of sense.

I ended publishing the data-encoding-macro-internal crate. So the issue should now be fixed (you may need to run cargo update though) without any additional action (like removing default-features = false or using the master branch) from your part.

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

No branches or pull requests

2 participants