E4012#

Mutable constructor fields are only allowed on labelled arguments.

Erroneous Example#

enum E {
  F(mut x : Int)
}

The example above declares an unlabeled mutable field x in the constructor of the F variant of the E enum, which is not allowed.

Suggestions#

Add a label to the mutable field:

enum E {
  F(mut x~ : Int)
}