Skip to content

Commit

Permalink
Rollup merge of rust-lang#123462 - fmease:rn-mod-sep-to-path-sep, r=n…
Browse files Browse the repository at this point in the history
…nethercote

Cleanup: Rename `ModSep` to `PathSep`

`::` is usually referred to as the *path separator* (citation needed).

The existing name `ModSep` for *module separator* is a bit misleading since it in fact separates the segments of arbitrary path segments, not only ones resolving to modules. Let me just give a shout-out to associated items (`T::Assoc`, `<Ty as Trait>::function`) and enum variants (`Option::None`).

Motivation: Reduce friction for new contributors, prevent potential confusion.

cc `@petrochenkov`
r? nnethercote or compiler
  • Loading branch information
fmease authored Apr 15, 2024
2 parents 7af33b3 + fd20426 commit dac1a22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ fn next_space(tok: &TokenKind) -> SpaceState {
| TokenKind::DotDotEq
| TokenKind::Question => SpaceState::Punctuation,

TokenKind::ModSep
TokenKind::PathSep
| TokenKind::Pound
| TokenKind::Dollar
| TokenKind::OpenDelim(_)
Expand Down

0 comments on commit dac1a22

Please sign in to comment.