-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
permit crate in absolute paths #45477
Copy link
Copy link
Closed
Labels
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
As part of #44660, we plan to support absolute paths that begin with
crate. The RFC was actually a bit vague about howcrate::foopaths work outside ofuseitems. I'm going to go with the interpretation described by @rpjohnst, that one would write::crate::footo reference the itemfoofrom outside of ausestatement.This means we want to support
usestatements like this:and "absolute" code references like this:
This version also avoids a parsing ambiguity around tuple structs and the
cratevisibility modifier: