# E0015

Warning name: `unused_mut`

The mutability is never used. It is a common mistake to declare an array to be
mutable when it is not necessary. Setting the value of an element in an array
does not require the array to be mutable. For example, `a[0] = 0` does not
require `a` to be mutable, but `a = [0, 1, 2]` does.

## Erroneous example

```{literalinclude} /sources/error_codes/0015_error/top.mbt
:language: moonbit
```

## Suggestion

Remove the `mut` keyword from the variable declaration.

```{literalinclude} /sources/error_codes/0015_fixed/top.mbt
:language: moonbit
```
