Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

impls_to_string drops mut and the colon of let mut

Closed Beginner friendly
#217 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #218 by @Lfan-ke — merged

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
87/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Domain
tooling

Research direction

Start with the LetMut case in fmt/internal/format/syntax2doc.mbt, which the issue identifies as producing the malformed output. Check how that case renders let mut and the type separator, then run the formatter’s relevant round-trip check with a function containing let mut. Done when formatting preserves valid let mut x : Int = 1 syntax and the round-trip check accepts it.

Written by the indexing model from the issue text.

Description

impls_to_string prints

let mut x : Int = 1

as

let x Int = 1

which does not parse. format is affected as well: its round-trip check rejects that output, so a function containing let mut is left unformatted.

The LetMut case in fmt/internal/format/syntax2doc.mbt writes text("let") and no : before the type.

Dominant language
MoonBit
Stars
35
Forks
10
Avg merge
9h 47m
Merged PRs (30d)
15

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from moonbitlang/parser

All issues in moonbitlang/parser

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.