Skip to content

Unable to init project because of compiler errors with proc-macro2 #219

Closed
@Mackiovello

Description

@Mackiovello

Steps to reproduce:

$ git show
commit e601e701a75a80df9a75296131215629636e9cf9
Merge: 77fb9cd 88fdbc5
Author: ashley williams <ashley666ashley@gmail.com>
Date:   Thu Jul 19 11:42:07 2018 -0400

    Merge pull request #198 from Mackiovello/issue/189

    Improve UX for pack and publish path expectations

$ pwd
/home/erlend/rust/wasm-pack
$ mkdir reprod
$ ls
Cargo.lock  CHANGELOG.md        CONTRIBUTING.md  docs            LICENSE-MIT  reprod  target
Cargo.toml  CODE_OF_CONDUCT.md  demo.gif         LICENSE-APACHE  README.md    src     tests
$ cd reprod/
$ cargo init --lib
     Created library project
$ vim Cargo.toml
<!-- add wasm-bindgen and crate-type -->
$ cd ..
$ cargo run init reprod/
   Compiling wasm-pack v0.4.1 (file:///home/erlend/rust/wasm-pack)
    Finished dev [unoptimized + debuginfo] target(s) in 2.57s
     Running `target/debug/wasm-pack init reprod/`

  [1/8] Checking crate configuration...
  [2/8] Adding WASM target...
/ [3/8] Compiling to WASM...
Compilation of your program failed. stderr:

    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling unicode-xid v0.1.0
   Compiling serde v1.0.70
   Compiling wasm-bindgen-shared v0.2.11
   Compiling itoa v0.4.2
   Compiling dtoa v0.4.3
   Compiling proc-macro2 v0.4.8
error[E0658]: use of unstable library feature 'proc_macro' (see issue #38356)
  --> /home/erlend/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.4.8/src/unstable.rs:33:40
   |
33 |     let works = panic::catch_unwind(|| proc_macro::Span::call_site()).is_ok();
   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(proc_macro)] to the crate attributes to enable

error[E0658]: use of unstable library feature 'proc_macro' (see issue #38356)
   --> /home/erlend/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.4.8/src/unstable.rs:213:13
    |
213 |     Nightly(proc_macro::token_stream::IntoIter),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: add #![feature(proc_macro)] to the crate attributes to enable

<!-- snip -->

error[E0658]: use of unstable library feature 'proc_macro' (see issue #38356)
   --> /home/erlend/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.4.8/src/unstable.rs:630:62
    |
630 |             (Literal::Nightly(lit), Span::Nightly(s)) => lit.set_span(s),
    |                                                              ^^^^^^^^
    |
    = help: add #![feature(proc_macro)] to the crate attributes to enable

error: aborting due to 63 previous errors

For more information about this error, try `rustc --explain E0658`.
error: Could not compile `proc-macro2`.
warning: build failed, waiting for other jobs to finish...
error: build failed

More information:

$ rustup -v
rustup 1.11.0 (e751ff9f8 2018-02-13)

Am I doing something wrong here or is this a regression?

Metadata

Metadata

Labels

PR attachedthere's a PR open for this issuebugSomething isn't workingto-dostuff that needs to happen, so plz do it k thx

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions