Skip to content

Unclear compiler error: "local ambiguity: multiple parsing options" #70974

Closed

Description

    macro_rules! chain_append {
        ($a:expr, $($b:literal .. $c:literal),* $($d:literal),*) => {{
            $a$(.chain($b..$c))*$(.chain(once($d)))*
        }}
    }
error: local ambiguity: multiple parsing options: built-in NTs literal ('b') or literal ('d').
  --> rasp_event/src/url_encoding.rs:46:35
   |
46 |         chain_append!(b'A'..b'Z', b'a'..b'z', b'0'..b'9', b'-', b'_', b',', b'~');
   |                                   ^^^^

I assume the 'b' comes from the prefix, but I don't understand where the 'd' comes in. This is just a hygienic macro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-enhancementCategory: An issue proposing an enhancement or a PR with one.D-terseDiagnostics: An error or lint that doesn't give enough information about the problem at hand.P-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions