rust-lang / rust-lang/rustfmt

Consider NFC normalization of idents?

Open
#6,058 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-identifiers A-lifetimes A-unicode C-feature-request
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
2d 13h
Merged PRs (30d)
24

Description

Raised by @Jules-Bertholet in https://github.com/rust-lang/rust/issues/120697

It could be desirable to NFC-normalize identifiers so as to remove these kinds of inconsistencies.

However, it seems plausible that this may cause issues if the identifiers are not local, e.g. they come from another crate that does not run rustfmt.

It may make sense, however, if rustc itself linted against non-NFC-normalized idents?

Contributor guide

Open the contributing guide

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.

Research direction

Start by reviewing the referenced rust-lang/rust issue 120697 and the discussion here about NFC-normalizing identifiers. Determine whether the desired behavior belongs in rustfmt or rustc, and how identifiers from another crate would be handled. Done requires a clearly agreed scope and compatibility expectations before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.