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

Wacky color highlighting caused by declarative macro inside another declarative macro in VS Code #14964

Closed
Pieresqi opened this issue Jun 4, 2023 · 1 comment
Labels
C-bug Category: bug

Comments

@Pieresqi
Copy link

Pieresqi commented Jun 4, 2023

rust-analyzer version: (eg. output of "rust-analyzer: Show RA Version" command, accessible in VSCode via Ctrl/⌘+Shift+P)

0.3.1533-standalone
0.4.1539-standalone

rustc version: (eg. output of rustc -V)

rustc 1.69.0
rustc 1.70.0

relevant settings: (eg. client settings, or environment variables like CARGO, RUSTC, RUSTUP_HOME or CARGO_HOME)

default by cargo new XXXX

Report
Wacky color highlighting caused by declarative macro inside another declarative macro in VS Code.

Expected(?) (before rust-analyzer loaded) result:
ok

Actual result:
err

Code:

let bol = true;

    // minimal reproduction
    let _ = format!("{}", {
        format!("");
        bol 
    },);

    let _ = format!(
        "{}{}{}",
        // ok
        if bol { "beep" } else { "boop" },
        // broke here
        format!("beep"),
        // broken :(
        if bol {
            "beep"
        } else {
            match bol {
                true => "beep",
                false => "boop",
            }
        }
    );

@Pieresqi Pieresqi added the C-bug Category: bug label Jun 4, 2023
@Veykril
Copy link
Member

Veykril commented Jun 4, 2023

This is #14841

@Veykril Veykril closed this as completed Jun 4, 2023
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

2 participants