Skip to content

Same description for crate and pathroot - #160500

Open
bb1yd wants to merge 1 commit into
rust-lang:mainfrom
bb1yd:same-message-for-crate-and-pathroot
Open

Same description for crate and pathroot#160500
bb1yd wants to merge 1 commit into
rust-lang:mainfrom
bb1yd:same-message-for-crate-and-pathroot

Conversation

@bb1yd

@bb1yd bb1yd commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 4, 2026
@rustbot

rustbot commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

r? @mejrs

rustbot has assigned @mejrs.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 75 candidates
  • Random selection from 21 candidates

@bb1yd
bb1yd force-pushed the same-message-for-crate-and-pathroot branch from c6fb263 to f132d8f Compare August 4, 2026 11:53
@bb1yd
bb1yd force-pushed the same-message-for-crate-and-pathroot branch from f132d8f to b5507ea Compare August 4, 2026 12:57
[.., prev] => {
if prev.ident.name == kw::PathRoot {
if prev.ident.name == kw::PathRoot || prev.ident.name == kw::Crate {
format!("the crate root")

@bjorn3 bjorn3 Aug 4, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a difference between :: (kw::PathRoot) and crate (kw::Crate). The former refers to the extern prelude (which contains --extern deps) since the 2018 edition, while the latter only refers to the root of the crate just like the former could have in the 2015 edition.

https://doc.rust-lang.org/edition-guide/rust-2018/path-changes.html#the-crate-keyword-refers-to-the-current-crate

View changes since the review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants