Skip to content

Match patterns can't be macros #6830

Closed
Closed
@huonw

Description

@huonw

E.g.

fn main() {
   match &[1,2,3] {
      bytes!("abc") => (),
      _ => ()
   }
}
pattern-macro.rs:3:11: 3:12 error: expected `=>` but found `!`
pattern-macro.rs:3       bytes!("abc") => (),
                              ^

Possibly required for #5346.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-lowLow priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions