you are viewing a single comment's thread
view the rest of the comments
[–] 6 points 1 year ago

As in using consts (or variables you think are consts) as refutable patterns? Yeah this was an oversight I'm sure.

One option is an edition change requiring a const keyword, so

match foo {
    const BAR => {},
    baz => {},
}

Right now they use a lint to try to warn the dev though.

  • source
  • parent