Skip to content
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

Wrong syntax highlight and definition of decl macro when working with #[tokio::test] proc-macro #17196

Open
Jisu-Woniu opened this issue May 6, 2024 · 0 comments
Labels
C-bug Category: bug

Comments

@Jisu-Woniu
Copy link

Jisu-Woniu commented May 6, 2024

screenshot

As is shown in the picture, the last assert_eq! macro got a incorrect definition and syntax highlight.

rust-analyzer version: 0.3.1950-standalone

rustc version: rustc 1.78.0 (9b00956e5 2024-04-29)

editor or extension: VS Code 1.89.0, rust-analyzer extension v0.3.1950 on Arch Linux

relevant settings: Don't remember

code snippet to reproduce:

src/lib.rs

#[cfg(test)]
mod tests {

    #[tokio::test]
    async fn it_works() {
        assert_eq!(2, 2);
        assert_eq!(4, 4);
    }
}

Cargo.toml:

[package]
name = "demo"
version = "0.1.0"
edition = "2021"

[dependencies]
tokio = { version = "1.37.0", features = ["macros", "rt-multi-thread"] }
@Jisu-Woniu Jisu-Woniu added the C-bug Category: bug label May 6, 2024
@Jisu-Woniu Jisu-Woniu changed the title Wrong syntax highlight and definition of assert(_eq,_ne)! macro when working with #[tokio::test] proc-macro Wrong syntax highlight and definition of decl macro when working with #[tokio::test] proc-macro May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

1 participant