Open bcully opened 3 years ago
Does anything change if you enable attribute proc macros (rust-analyzer.experimental.procAttrMacros
)?
No, it still passes --exact
This was actually working for me suddenly but now not anymore. https://github.com/rust-analyzer/rust-analyzer/issues/10744 even shows it working.
I am also recently seeing this issue. It was working sometime in the last 30 days with rstest, but now doesnt show the test lens
rust-analyzer: v0.3.1992 rstest: 0.21.0 (and 0.18.x) vscode settings:
"rust-analyzer.procMacro.attributes.enable": true,
"rust-analyzer.procMacro.enable": true
This works fine for me on the latest nightly release
Does happen in a clean project for you?
I am working on a project that uses test_case and rstest to parameterize tests over a range of test cases. They both appear to work by converting their test functions into modules, i.e.,
would generate the tests
But because the rust-analyzer test lens thinks that this function is a function and not a module, it passes
--exact
to thecargo test
invocation, which causes the test runner to run 0 tests.I'd love it if rust_analyzer could figure out that after macro expansion there was a module here instead of a function, but failing that it would be great if there were a way to turn off
--exact
by hand.Thanks!