-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support extern
in paths
#47156
Support extern
in paths
#47156
Conversation
…_paths` into the unstable book
//~^ NOTE cannot glob-import all possible crates | ||
|
||
fn main() { | ||
let s = extern::xcrate; //~ ERROR expected value, found module `extern::xcrate` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason not to support extern::
paths in this location? I had thought that one of the bonus points to using a syntax like extern
for absolute paths was precisely that it could be unambiguously used anywhere. Basically, the set of paths accepted in a use
would now be a strict subset of those that could be accepted elsewhere (excluding relative paths, obviously).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's accepted in this location (as tested in the run-pass
test), here we are just checking that extern::xcrate
is indeed a crate, and a crate can't be used as a value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh oh I see =) thanks
@bors r+ |
📌 Commit ef2b131 has been approved by |
⌛ Testing commit ef2b131 with merge e08d3784f6fcdfd30b5612c1a876fc3a4ecf0a50... |
💔 Test failed - status-appveyor |
Appveyor timeout |
⌛ Testing commit ef2b131 with merge 6f360898bc47b930b1f8a2ffc0c1d61e5cc3e795... |
💔 Test failed - status-appveyor |
@bors retry 3 hour timeout. |
Support `extern` in paths Implement the primary alternative to #46613 + #45771, achieving the same effect without requiring changes to other imports. Both need to be experimentally evaluated before making further progress. The PR also adds docs for all these related features into the unstable book. cc #44660 r? @nikomatsakis
☀️ Test successful - status-appveyor, status-travis |
Implement the primary alternative to #46613 + #45771, achieving the same effect without requiring changes to other imports.
Both need to be experimentally evaluated before making further progress.
The PR also adds docs for all these related features into the unstable book.
cc #44660
r? @nikomatsakis