this post was submitted on 01 Sep 2025
29 points (93.9% liked)

Rust

8116 readers
10 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] TehPers@beehaw.org 6 points 10 months 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.