You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code gives an error pointing to the static FOO line, but not pointing to the FOO => line, so it's not obvious that the problem is really the match. I originally encountered this from (a form of) the bitflags! macro, which was doubly confusing.
pubstructFlags{bits:uint,}staticFOO:Flags = Flags{bits:0x01};staticBAR:Flags = Flags{bits:0x02};// caller is guaranteed to only set one bit here.pubfnfrob(f:Flags){match f
{FOO => {}BAR => {}
_ => {}}}
The text was updated successfully, but these errors were encountered:
This is accomplished by rewriting static expressions into equivalent patterns.
This way, patterns referencing static variables can both participate
in exhaustiveness analysis as well as be compiled down into the appropriate
branch of the decision trees that match expressions are codegened to.
Fixes#6533.
Fixes#13626.
Fixes#13731.
Fixes#14576.
Fixes#15393.
SCIP: Qualify parameters by the containing function
SCIP requires symbols to be unique, but multiple functions may have a parameter with the same name. Qualify parameters according to the containing function.
The following code gives an error pointing to the
static FOO
line, but not pointing to theFOO =>
line, so it's not obvious that the problem is really thematch
. I originally encountered this from (a form of) thebitflags!
macro, which was doubly confusing.The text was updated successfully, but these errors were encountered: