3 ms·
It might also help to manually annotate the type of the binding being assigned to. let v: Vec<i32> = vec![ pt ]; let vpt = &v[0];
by tomjakubowski 9y ago
It might also help to manually annotate the type of the binding being assigned to.
let v: Vec<i32> = vec![ pt ];
let vpt = &v[0];
- int_19h 9y agoNope, doesn't help (corrected to Vec<Point>). The only thing that works is annotating the vpt binding itself. 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.
- saghm 9y agoI wonder if this is an issue with the VSCode extension rather than the RLS then; all RLS can do is provide information to the extension, so maybe the extension just isn't using the information.