-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RA getting confused on the combo of test_log::test and ntest::timeout #11109
Comments
As far as I've tested it's release 2021-11-22 183ef04 that breaks this. 2021-11-15 still works for me. |
I think this is an upstream |
The crash is no more with becheran/ntest#23 (there is no release yet) but run/debug annotations are still missing: becheran/ntest#18 I've tried to debug it but the investigation led me to parts of RA that are rather hard to follow for somebody who is not familiar with them. #[test]
fn some_test() {
()
}
#[test]
#[ntest_timeout::timeout(1000)]
fn some_other_test() {
()
} For
So
causing I doubt I'll have some much more time to spend on this issue so hopefully somebody comes up with an idea what is wrong or how to debug it. |
If I understand correctly, ntest uses |
I think this is just
Yes. Don't know if it's relevant but I should have mentioned it, when RA initially parses the code it sees attribute macros. This is the same Details
So RA will always (during initial parsing and when working with code) get correct |
What |
#[test]
fn some_test() {
()
} gives:
#[test]
#[ntest_timeout::timeout(1000)]
fn some_other_test() {
()
} gives:
#[tokio_macros::test]
async fn some_another_test() {
()
} gives:
|
Since a few weeks, RA is giving me
Expected identifier!
error on allntest::timeout
macro usage in my code, when used together withtest_log::test
macro (see screenshot). Since I'm using this comb in most of my tests, that's quite many errors so it's hard to see how many real errors I got.I can reproduce in both VS Code and vim.
rust-analyzer version: 0add6e9 2021-12-20 stable (but I get the same with: 4ea1f58 2021-12-23 nightly).
rustc version: v1.56.1
The text was updated successfully, but these errors were encountered: