racer-rust / racer

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

cargo +nightly install racer returns error | rustc-ap-rustc_data_structures v651.0.0 errors #1101

Closed fhefh2015 closed 4 years ago

fhefh2015 commented 4 years ago

Lately I have been reading a lot about Rust language and today finally I've decided to give it a try. Unfortunately when I run:

cargo +nightly install racer

I get the following error:

Compiling env_logger v0.7.1
   Compiling rustc-ap-rustc_data_structures v651.0.0
error[E0599]: no method named `get` found for type `u64` in the current scope
   --> /Users/aric/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-651.0.0/profiling.rs:348:66
    |
348 |             let thread_id = std::thread::current().id().as_u64().get() as u32;
    |                                                                  ^^^ method not found in `u64`

error[E0599]: no method named `get` found for type `u64` in the current scope
   --> /Users/aric/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-651.0.0/profiling.rs:525:62
    |
525 |         let thread_id = std::thread::current().id().as_u64().get() as u32;
    |                                                              ^^^ method not found in `u64`

   Compiling synstructure v0.12.3
error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0599`.
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: failed to compile `racer v2.1.32`, intermediate artifacts can be found at `/var/folders/wg/2s5y4khx539135fl_ch4th680000gn/T/cargo-installmoVgCO`

Caused by:
  build failed

I have alredy ran rustup toolchain add nightly

Is there something I am missing? Any help would be greatly appreciated.

kngwyu commented 4 years ago

Please try rustup toolchain add nightly-2020-03-30 --force and cargo +nightly-2020-03-30 or wait for the upstream update.

znewman01 commented 4 years ago

Thanks! I'm running into the same issue and don't want to update to 2020-03-30 because RLS isn't available and I don't use rustup on this machine for multiple installations; the following worked with 2020-03-19 (the last RLS nightly):

cargo install racer \
    --git https://github.com/racer-rust/racer.git \
    --rev ea6f73e4dfc4faafab2f2ac732abf10ce71c80c1