Open augustocdias opened 2 years ago
This may be related to the #[wasm_bindgen_test]
or #[apply(all_credential_types)]
. Does removing either or both work? Also did you save after making the change? I don't think rust-analyzer has native support for this error yet. As such you need to save to allow cargo check
to report it.
On VSCode it has auto save. On neovim I always save to check for new diagnostics.
If I add a regular #[test]
it works on other projects. If I add one in these modules containing the #[wasm_bindgen_test]
it doesn't work either.
I'm having no diagnostics on a specific project. I suspect it has to do with the custom macros for the tests in this project.
If you go to this test for example: https://github.com/wireapp/core-crypto/blob/develop/crypto/src/external_commit.rs#L235 And change any line to call an invalid function: for ex calling
unwrap
on aVec
, there'll be no diagnostic for it.I use neovim, but I could reproduce it with vscode as well. I've got additional errors with vscode that I didn't with neovim. It crashed once for example when it tried to auto complete. In neovim it doesn't crash but there is no auto complete in those tests.
rust-analyzer version: rust-analyzer 0.0.0 (897a7ec4b 2022-07-17)
rustc version: rustc 1.62.1 (e092d0b6b 2022-07-16)
relevant settings: the settings I use can be found here: https://github.com/augustocdias/dotfiles/blob/main/.config/nvim/lua/lsp-config.lua#L158
analysis-stats:
Output > Rust Analyzer Language Server Trace (this is from VSCode, I'm not sure where to get the logs for NeoVim)