racer-rust / racer

Rust Code Completion utility
MIT License
3.36k stars 278 forks source link

Racer installation fails on current nightly build (rustc-ap-rustc_data_structures v642.0.0 failure) #1096

Closed ghost closed 4 years ago

ghost commented 4 years ago

running the command: cargo +nightly install racer default toolchain: nightly-x86_64-pc-windows-gnu rustc version: rustc 1.44.0-nightly (d1e81ef23 2020-03-22) cargo version: cargo 1.44.0-nightly (7019b3ed3 2020-03-17) rustup version: rustup 1.21.1 (7832b2ebe 2019-12-20)

Snipaste_2020-03-23_13-09-30

jramapuram commented 4 years ago

Same error on osx:

   Compiling synstructure v0.12.1
error[E0605]: non-primitive cast: `std::num::NonZeroU64` as `u32`
   --> /Users/jramapuram/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-642.0.0/profiling.rs:312:29
    |
312 |             let thread_id = std::thread::current().id().as_u64() as u32;
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait

error[E0605]: non-primitive cast: `std::num::NonZeroU64` as `u32`
   --> /Users/jramapuram/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-642.0.0/profiling.rs:471:25
    |
471 |         let thread_id = std::thread::current().id().as_u64() as u32;
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0605`.
error: could not compile `rustc-ap-rustc_data_structures`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
kngwyu commented 4 years ago

Thanks, this should be fixed by #1097

alexanderjamesking commented 4 years ago

Hi @kngwyu, I tried again on OS X and I'm still getting the same issue:

error[E0605]: non-primitive cast: `std::num::NonZeroU64` as `u32`
   --> /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-642.0.0/profiling.rs:312:29
    |
312 |             let thread_id = std::thread::current().id().as_u64() as u32;
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait

error[E0605]: non-primitive cast: `std::num::NonZeroU64` as `u32`
   --> /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-642.0.0/profiling.rs:471:25
    |
471 |         let thread_id = std::thread::current().id().as_u64() as u32;
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0605`.
error: could not compile `rustc-ap-rustc_data_structures`.
jramapuram commented 4 years ago

@alexanderjamesking : this is fixed by building with nightly as stated in the README.md: cargo +nightly build --release

alexanderjamesking commented 4 years ago

I'm still getting an issue trying to build the latest master, perhaps a separate issue:

   Compiling serde_derive v1.0.101
   Compiling derive_more v0.99.2
   Compiling rustc-ap-rustc_span v650.0.0
error[E0658]: negative trait bounds are not yet fully implemented; use marker types for now
    --> /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-650.0.0/symbol.rs:1281:6
     |
1281 | impl !Send for SymbolStr {}
     |      ^^^^^
     |
     = note: see issue #68318 <https://github.com/rust-lang/rust/issues/68318> for more information
     = help: add `#![feature(negative_impls)]` to the crate attributes to enable

error[E0658]: negative trait bounds are not yet fully implemented; use marker types for now
    --> /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-650.0.0/symbol.rs:1282:6
     |
1282 | impl !Sync for SymbolStr {}
     |      ^^^^^
     |
     = note: see issue #68318 <https://github.com/rust-lang/rust/issues/68318> for more information
     = help: add `#![feature(negative_impls)]` to the crate attributes to enable

error[E0658]: negative trait bounds are not yet fully implemented; use marker types for now
  --> /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-650.0.0/fatal_error.rs:12:6
   |
12 | impl !Send for FatalError {}
   |      ^^^^^
   |
   = note: see issue #68318 <https://github.com/rust-lang/rust/issues/68318> for more information
   = help: add `#![feature(negative_impls)]` to the crate attributes to enable

error[E0658]: negative trait bounds are not yet fully implemented; use marker types for now
   --> /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-650.0.0/lib.rs:217:6
    |
217 | impl !Send for Span {}
    |      ^^^^^
    |
    = note: see issue #68318 <https://github.com/rust-lang/rust/issues/68318> for more information
    = help: add `#![feature(negative_impls)]` to the crate attributes to enable

error[E0658]: negative trait bounds are not yet fully implemented; use marker types for now
   --> /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-650.0.0/lib.rs:219:6
    |
219 | impl !Sync for Span {}
    |      ^^^^^
    |
    = note: see issue #68318 <https://github.com/rust-lang/rust/issues/68318> for more information
    = help: add `#![feature(negative_impls)]` to the crate attributes to enable

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0658`.
error: could not compile `rustc-ap-rustc_span`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
kngwyu commented 4 years ago

@alexanderjamesking It looks the problem of a compiler version. Please try rustup toolchain add nightly-2020-03-26 --force and cargo +nightly-2020-03-26 or wait for the upstream update.

alexanderjamesking commented 4 years ago

@alexanderjamesking It looks the problem of a compiler version. Please try rustup toolchain add nightly-2020-03-26 --force and cargo +nightly-2020-03-26 or wait for the upstream update.

That worked, thank you! I'm fairly new to all of this, but racer is working in emacs now 🎉

crides commented 4 years ago

On Arch, using the Mar 26 nightly compiler, still failing with "no feature negative_impl".

Full build log:

steven in racer on  master is 📦 v2.1.32 via  v1.42.0
17:12:33 î‚° cargo +nightly-2020-03-26 install --path .
  Installing racer v2.1.32 (/home/steven/gitproj/bcget/racer)
    Updating crates.io index
   Compiling autocfg v1.0.0
   Compiling libc v0.2.68
   Compiling cfg-if v0.1.10
   Compiling proc-macro2 v1.0.10
   Compiling unicode-xid v0.2.0
   Compiling maybe-uninit v2.0.0
   Compiling lazy_static v1.4.0
   Compiling semver-parser v0.7.0
   Compiling syn v1.0.17
   Compiling scopeguard v1.1.0
   Compiling smallvec v1.2.0
   Compiling log v0.4.8
   Compiling bitflags v1.2.1
   Compiling byteorder v1.3.4
   Compiling rustc-rayon-core v0.3.0
   Compiling either v1.5.3
   Compiling rustc-hash v1.1.0
   Compiling stable_deref_trait v1.1.1
   Compiling unicode-width v0.1.7
   Compiling rustc-ap-graphviz v651.0.0
   Compiling scoped-tls v1.0.0
   Compiling serde v1.0.106
   Compiling memchr v2.3.3
   Compiling rustc-ap-rustc_ast v651.0.0
   Compiling ryu v1.0.3
   Compiling rustc-ap-rustc_target v651.0.0
   Compiling termcolor v1.1.0
   Compiling annotate-snippets v0.6.1
   Compiling quick-error v1.2.3
   Compiling itoa v0.4.5
   Compiling regex-syntax v0.6.17
   Compiling rustc-ap-rustc_fs_util v651.0.0
   Compiling ansi_term v0.11.0
   Compiling strsim v0.8.0
   Compiling vec_map v0.8.1
   Compiling lazycell v1.2.1
   Compiling humantime v2.0.0
   Compiling rustc-ap-rustc_lexer v651.0.0
   Compiling crossbeam-utils v0.6.6
   Compiling thread_local v1.0.1
   Compiling lock_api v0.3.3
   Compiling semver v0.9.0
   Compiling unicode-normalization v0.1.12
   Compiling crossbeam-utils v0.7.2
   Compiling memoffset v0.5.4
   Compiling crossbeam-epoch v0.8.2
   Compiling indexmap v1.3.2
   Compiling textwrap v0.11.0
   Compiling humantime v1.3.0
   Compiling crossbeam-queue v0.1.2
   Compiling rustc_version v0.2.3
   Compiling smallvec v0.6.13
   Compiling num_cpus v1.12.0
   Compiling parking_lot_core v0.7.0
   Compiling memmap v0.7.0
   Compiling jobserver v0.1.21
   Compiling atty v0.2.14
   Compiling termize v0.1.1
   Compiling quote v1.0.3
   Compiling ena v0.13.1
   Compiling parking_lot_core v0.6.2
   Compiling parking_lot v0.9.0
   Compiling aho-corasick v0.7.10
   Compiling parking_lot v0.10.0
   Compiling clap v2.33.0
   Compiling rustc-ap-serialize v651.0.0
   Compiling regex v1.3.6
   Compiling crossbeam-deque v0.7.3
   Compiling rustc-ap-rustc_index v651.0.0
   Compiling env_logger v0.7.1
   Compiling synstructure v0.12.3
   Compiling measureme v0.7.1
   Compiling rustc-rayon v0.3.0
   Compiling rustc-ap-rustc_data_structures v651.0.0
   Compiling rustc-ap-arena v651.0.0
   Compiling rustc-ap-rustc_macros v651.0.0
   Compiling serde_derive v1.0.106
   Compiling derive_more v0.99.5
   Compiling rustc-ap-rustc_span v651.0.0
error[E0635]: unknown feature `negative_impls`
  --> /home/steven/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-651.0.0/lib.rs:12:37
   |
12 | #![cfg_attr(not(bootstrap), feature(negative_impls))]
   |                                     ^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0635`.
error: could not compile `rustc-ap-rustc_span`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `racer v2.1.32 (/home/steven/gitproj/bcget/racer)`, intermediate artifacts can be found at `/home/steven/gitproj/bcget/racer/target`

Caused by:
  build failed