Skip to content

Token mapping no longer works for tokens following a float literal #12179

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

Closed
jonas-schievink opened this issue May 6, 2022 · 1 comment
Closed
Labels
A-macro macro expansion C-bug Category: bug S-actionable Someone could pick this issue up and work on it right now

Comments

@jonas-schievink
Copy link
Contributor

macro_rules! constant {
    ($( $ret:expr ; )*) => {
        fn f() {
            $( $ret; )*
        }
    };
}

constant! {
    -0.0;
    KONST;
}

const KONST: () = ();

Here KONST inside the macro doesn't have highlighting or hover (but the macro does expand correctly). Swapping the two lines in the macro makes it work again. Caused by #12149.

@jonas-schievink jonas-schievink added A-macro macro expansion S-actionable Someone could pick this issue up and work on it right now C-bug Category: bug labels May 6, 2022
@jonas-schievink jonas-schievink changed the title Token mapping no longer works when float literal is present Token mapping no longer works for tokens following a float literal May 6, 2022
@jonas-schievink
Copy link
Contributor Author

The PR causing this was reverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macro macro expansion C-bug Category: bug S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

No branches or pull requests

1 participant