Skip to content

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

Closed
@jonas-schievink

Description

@jonas-schievink
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macromacro expansionC-bugCategory: bugS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions