Closed
Description
Follows rust-lang/rls#1449.
EDIT: New elements there.
I'm trying to develop a crate which ends up using nix
as a dependency.
I'm getting the following error through RLS :
(stable-x86_64-unknown-linux-gnu unchanged - rustc 1.34.1 (fc50f32 2019-04-24), ArchLinux 5.0.10-arch1-1-ARCH)
Could not compile `nix`.
process didn't exit successfully: `/home/xxx/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rls --crate-name nix /home/xxx/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.13.0/src/lib.rs --color never --crate-type lib --emit=dep-info,metadata -C debuginfo=2 -C metadata=e41c62fd44c3a368 -C extra-filename=-e41c62fd44c3a368 --out-dir /home/xxx/bug/target/rls/debug/deps -L dependency=/home/xxx/bug/target/rls/debug/deps --extern bitflags=/home/xxx/bug/target/rls/debug/deps/libbitflags-162b4a56bd08b901.rmeta --extern cfg_if=/home/xxx/bug/target/rls/debug/deps/libcfg_if-dab04317bb5fc6db.rmeta --extern libc=/home/xxx/bug/target/rls/debug/deps/liblibc-98ec97d48b6e5b85.rmeta --extern void=/home/xxx/bug/target/rls/debug/deps/libvoid-e59ad8b8a3ae09b4.rmeta --cap-lints allow --error-format=json --sysroot /home/xxx/.rustup/toolchains/stable-x86_64-unknown-linux-gnu` (exit code: 101)
Using "rust-client.logToFile": true,
to get the log, I get this additional information:
{"message":"src/librustc/ty/context.rs:541: node_type: no type for node `expr <Self>::AT_SYMLINK_NOFOLLOW (id=43804)`","code":null,"level":"error: internal compiler error","spans":[],"children":[],"rendered":"error: internal compiler error: src/librustc/ty/context.rs:541: node_type: no type for node `expr <Self>::AT_SYMLINK_NOFOLLOW (id=43804)`\n\n"}
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:620:9
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.34.1 (fc50f328b 2019-04-24) running on x86_64-unknown-linux-gnu
note: compiler flags: -C debuginfo=2 --crate-type lib
note: some of the compiler flags provided by cargo are hidden
This error does not happen when compiling through cargo check
, cargo build
, cargo build --release
, cargo doc
, etc, only through RLS, but I suppose the compiler is not supposed to crash anyway.
The following minimal project triggers the bug when opening VSCode with the RLS extension installed :
Cargo.toml
:
[package]
name = "bug"
version = "1.0.0"
authors = ["Le me"]
edition = "2018"
publish = false
[dependencies]
nix = "0.13.0"
src/main.rs
:
fn main() {
let hw = "HelloWorld";
println!("{}", hw);
}