Skip to content

Commit b3a82d8

Browse files
authored
Rollup merge of rust-lang#123462 - fmease:rn-mod-sep-to-path-sep, r=nnethercote
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
2 parents febf858 + a1e76af commit b3a82d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/crate_in_macro_def.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ fn contains_unhygienic_crate_reference(tts: &TokenStream) -> Option<Span> {
8888
if !prev_is_dollar
8989
&& let Some(span) = is_crate_keyword(curr)
9090
&& let Some(next) = cursor.look_ahead(0)
91-
&& is_token(next, &TokenKind::ModSep)
91+
&& is_token(next, &TokenKind::PathSep)
9292
{
9393
return Some(span);
9494
}

0 commit comments

Comments
 (0)