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

Recognize Rust function modifier combinations in the spacing helper

Open Beginner friendly
#890 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python, rust
Domain
tooling

Research direction

Start in tools/format-rust.py, focusing on is_function_start and add_function_spacing; read the existing prefix checks and how the helper distinguishes function bodies. Add the requested table-driven Python regression for modifier combinations, restricted visibility, bodyless declarations, and extern blocks. Run the regression and confirm adjacent functions are separated without false positives from strings or extern blocks.

Written by the indexing model from the issue text.

Description

bug good first issue

Problem

is_function_start uses a short prefix list. Valid pub(crate) const fn functions and other modifier combinations are not detected, leaving adjacent functions unseparated.

Reproduction

Executed the helper at fd07427f4a976de05e38eff3ee1760db97fbb761 using importlib and add_function_spacing on:

pub(crate) const fn first() {}
pub(crate) const fn second() {}

The result is unchanged; the intended separating blank line is missing. Starting point: tools/format-rust.py.

Scope

Recognize legal visibility and const/async/unsafe/extern combinations without treating arbitrary extern blocks or fn text in strings as functions. Difficulty: easy.

Completion criteria

  • Cover combined modifiers and restricted visibility.
  • Keep bodyless declarations and extern blocks distinct.
  • Add a small table-driven Python regression.
Dominant language
Rust
Stars
56
Forks
21
Avg merge
4h 44m
Merged PRs (30d)
57

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 wavefnd/Wave

All issues in wavefnd/Wave

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.