I'm fairly certain the reason for this is that RLS (and every other Rust editor/tool I've tried) isn't able to handle completions for things coming from macros (transitively or otherwise). Although the prevalence of the `vec!` macro might make it seem like the completion is "extremely basic", variables coming from macros are pretty much the only case I've found that RLS can't completely properly for. If you manually write the code that the macro would produce (i.e. `{ let mut temp = Vec::new(); temp.push(pt); temp }`, I think it should work fine.
let v: Vec<i32> = vec![ pt ];
let vpt = &v[0];In any case, if you have to annotate all local bindings for completion to work, that's not idiomatic Rust anymore.
Another interesting thing that I've noticed, is that it does know what vpt.x and vpt.y are - when hovering over them, it correctly says that they're i32. So the type inference works as it should. It's specifically completion that is broken here for some unclear reason.
Besides, it does know the type of vpt in code snippet above - like I said, when I hover about it, it correctly tells me that it's &Point. So it clearly can handle macros, or at least vec! specifically.
Even more weird is that if I add a type declaration to "let vpt" (specifying the same type that would be inferred), then completion works.
That sounds like a really basic scenario... I mean, type inference for locals is pervasive in Rust.