No Autocomplete in Integration Tests for Items from the Library Target
I am running:
- rls:
1.35.0 (49efc06 2019-04-06) - VSCode
Rust (rls) 0.6.1 - OS: macOS 10.14.5
In my integration tests, autocomplete does not seem to be able to provide completions for items from my library target. However, autocomplete works fine for items within the integration test.
Cargo.toml
[package]
name = "xxx"
version = "0.1.0"
authors = ["xxx"]
edition = "2018"
[lib]
name="mylib"
path="src/lib.rs"
src/lib.rs
pub struct Node {
value: i32
}
tests/test.rs
use mylib;
fn other() {
}
#[test]
fn test() {
let node = mylib::Node{ value: 1 }; // No autocomplete for Node
other(); // Autocomplete works fine for other
}
Although this compiles just fine.
Put extern crate mylib at the top of the test.rs fixes the issue and still compiles just fine, but the tutorial doesn't use them. It just uses use mylib;
Edit:
I rustup to 1.36, still having the same problem.
I'm experiencing the same thing.
My setup:
- VS Code: 1.37.1
- Language server on VS Code: 0.6.1
- macOS 10.14.4
ditto, was going to raise and issue It does work with CLion and the intelli-j rust plugin.
Is this an RLS issue or a vscode issue?
CLion + rust has a whole bunch of other issues...
I have this as well. Experienced on Ubuntu 19.10/VSCode and Windows with same configuration.
rust-analyzer fixes this issue!