Description
I've had this issue for a while now, and I'll try to be as descriptive as I can.
Within a function, autocomplete sometimes completely stops working (it says "no suggestions"). I'm using only rust-analyzer
for Rust, and VSCode. This issue has persisted across multiple installs of both VSCode, and Void Linux. I also had the issue on Fedora 36.
The issue seems to happen randomly, but the easiest way I can reproduce it is by bringing more than one error into scope.
Here's some example code:
pub fn x() -> Result<()> {
let x = Instant::now();
let _ = test(v1, v2, v3)?;
let x_duration = x.elapsed();
logger.success(format!(
"Success",
x_duration.as_secs_f32()
));
}
Under normal circumstances, selecting the end of Instant
and hitting ctrl+space would bring the menu up, offering to import std::time::Instant
- but it doesn't.
It also sometimes happens just randomly, either showing "no suggestions", or relaying a list of my variable names to me.
Using rust-analyzer 7322a982f 2022-06-16
(I'm not too sure where to find a version string)