Closed
Description
Hello everyone! Love the work you are doing for the community!
Setup
VSCode plugin: v0.2.817
Rust: 1.56.1 (59eed8a2a 2021-11-01)
Cargo: 1.56.0 (4ed5d137b 2021-10-04)
Rust Analyzer: 73668334f 2021-11-15 stable
Problem
I can confirm it happening in NeoVim as well, so it's not unique to VSCode setup.
Screen.Recording.2021-11-17.at.18.34.58.mov
Reproduction
Here is the smallest reproducable example I can get:
- Do
cargo init rust-analyzer-autocomplete-bug
- Do
cargo add tracing
- Add following to your
main.rs
and try to typetest
where comment is - Observe things not working
- Remove
#[tracing::instrument]
and try again to typetest
where comment is - Observe everything working fine
// main.rs
use std::collections::HashSet;
fn main() {
println!("Hello, world!");
}
struct Test;
impl Test {
fn test() -> HashSet<String> {
HashSet::new()
}
}
#[tracing::instrument]
async fn buggy_autocomplete() {
let test = Test::test();
// cannot autocomplete test here
}
I'd be happy to provide any additional details if needed. Really am excited about your project getting better every weak! 🎉