Description
In an empty (latest rust-analyzer, nightly rust) VSCode project, I am getting the following (related) errors to do with the vec!
macro.
It seems as if rust-analyzer is maybe unable to resolve the second type parameter related to the new allocator API, and that error stops it from filling in the first parameter. Weirdly, it semi-correctly identifies a char
in the following image, but thinks that it is part of an array.
It also identifies vec!["];
to be a Vec<[&str; _]>
.
This is probably not a direct repeat of #6668 - I'm using a nightly version of rust-analyzer released after that issue was patched. Also, using the normal Vec
constructor, and adding elements in afterwards, works fine thanks to type inference - it's only a problem with the macro, it seems.