# E0041

Warning name: `missing_rest_mark`

Closed map pattern.

MoonBit's map pattern syntax does not support closed pattern
(i.e. asserting that the map does not contain any other unmatched elements).
So map patterns must always contain a `..`, otherwise this warning will be reported.

## Erroneous example
```{literalinclude} /sources/error_codes/0041_error/top.mbt
:language: moonbit
```

## Suggestion
- If the intended semantic is open matching (i.e. allow existence of unmatched elements),
  just add `..` to the map pattern.
- If the intended semantic is closed matching, use pattern guard instead:
    ```{literalinclude} /sources/error_codes/0041_fixed/top.mbt
    :language: moonbit
    ```
