Open gasabr opened 4 years ago
I can confirm the same issue on arch using the latest rustup from the official arch repository (1.22.1-1).
$ rustup toolchain list stable-x86_64-unknown-linux-gnu (default) nightly-x86_64-unknown-linux-gnu
Same issue in windows.
$ cargo +nightly build --release
Compiling serde v1.0.105
Compiling rustc-ap-rustc_ast v669.0.0
Compiling rustc-ap-rustc_errors v669.0.0
error: `std::intrinsics::transmute` is not yet stable as a const fn
--> C:\Users\elecm\.cargo\registry\src\github.com-1ecc6299db9ec823\rustc-ap-rustc_ast-669.0.0\ptr.rs:136:17
|
136 | std::mem::transmute(NonNull::<[T; 0]>::dangling() as NonNull<[T]>)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add `#![feature(const_transmute)]` to the crate attributes to enable
error: aborting due to previous error
error: could not compile `rustc-ap-rustc_ast`.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
Same issue in OSX. Similar messages to what everyone has above.
Same issue in Ubuntu20.04.
error: std::intrinsics::transmute is not yet stable as a const fn
--> /home/lin/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_ast-669.0.0/ptr.rs:136:17 |
136 | std::mem::transmute(NonNull::<[T; 0]>::dangling() as NonNull<[T]>) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
= help: add `#![feature(const_transmute)]` to the crate attributes to enable
error: aborting due to previous error
error: could not compile rustc-ap-rustc_ast
.
To learn more, run the command again with --verbose. warning: build failed, waiting for other jobs to finish... error: build failed
As the error message says, it is a problem with rustc_ast. I tried upgrading the version of rustc_ast racer depends on, but that did not help either.
The following changes worked for me:
rustc_ast (v669.0.0, default for racer right now):
Change ~/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_ast-669.0.0/lib.rs
line 13
from #![cfg_attr(not(bootstrap), feature(const_fn_transmute))]
to #![feature(const_transmute)]
rustc_ast (v670.0.0, latest):
Change ~/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_ast-670.0.0/lib.rs
line 12
from #![feature(const_fn_transmute)]
to #![feature(const_transmute)]
I'm trying to install racer both from cargo and from sources and receive error:
env: I'm on ubuntu 18.04 under wsl
I've tried to change toolchain, install 2.0.13, 2.0.14 neither of that worked:(