Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Distinguish Rust character literals from lifetimes in the spacing helper

オープン 初心者向け
#888 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python, rust
領域
testing, tooling

調査の方向性

tools/format-rust.pyから始め、特にadd_function_spacingと字句状態の処理を確認してください。再現ケース、ライフタイム、エスケープされた引用符、バイト文字リテラルを対象とする、焦点を絞ったPythonテストを追加してください。関数境界が検出されること、リテラルの内容が変更されないこと、繰り返し実行しても冪等であることを検証してください。

索引モデルが issue の本文から書いたものです。

説明

bug good first issue

Problem

An alphabetic char literal such as 'a' is treated as a lifetime prefix. Its closing quote opens char state, so function boundaries later in the file disappear.

Reproduction

Executed the helper at fd07427f4a976de05e38eff3ee1760db97fbb761 using importlib and add_function_spacing on:

fn first() {
    let c = 'a';
}
fn second() {}

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

Scope

Fix lexical state for character/escaped/byte-character literals while preserving lifetimes. Keep literal contents unchanged. Difficulty: easy.

Completion criteria

  • Find function boundaries after char literals.
  • Cover lifetimes, escaped quotes and byte chars.
  • Keep the helper idempotent with focused Python tests.
主要言語
Rust
スター
56
フォーク
21
平均マージ
4時間 19分
マージ済み PR(30日)
49

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

wavefnd/Wave のほかの issue

wavefnd/Wave の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。