Problem with the Rust analyzer on struct (VS Code)

Hi, I have a little problem with the Rust analyzer extension on VS Code when I use struct :

As you can see, Rust warn me with a lot of false warning.

Cargo compiled my project with no warm at all.

Do you see anything?

I personally don't use VSCode but if the creation and utilization are in different files I guess VSCode hasn't correctly indexed your project files. Restarting VSCode or re-indexing should fix the issue.

The code is only one file, but indeed there is a command from the Rust analyzer and the warns go away :
image

Thanks!

1 Like