Skip to content
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

Extern crate #742

Merged
merged 8 commits into from
Feb 5, 2019
Merged

Extern crate #742

merged 8 commits into from
Feb 5, 2019

Conversation

flodiebold
Copy link
Member

This implements extern crate declarations by lowering them to (absolute) imports, and adds support for absolute paths. It also extracts the extern prelude from the per-module item map, and handles the special case of extern crates in the crate root adding to the extern prelude.

This means we finally resolve Arc, so it fixes #523 😄

Also change it to parse the crate name as a NAME_REF, not a NAME.
This is probably not completely correct, but it kind of works.
To accomplish this, separate the extern prelude from the per-module item maps.
@flodiebold flodiebold requested a review from matklad February 4, 2019 21:22
@matklad
Copy link
Member

matklad commented Feb 5, 2019

bors r+

bors bot added a commit that referenced this pull request Feb 5, 2019
742: Extern crate r=matklad a=flodiebold

This implements `extern crate` declarations by lowering them to (absolute) imports, and adds support for absolute paths. It also extracts the extern prelude from the per-module item map, and handles the special case of extern crates in the crate root adding to the extern prelude.

This means we finally resolve `Arc`, so it fixes #523 😄 

Co-authored-by: Florian Diebold <[email protected]>
@bors
Copy link
Contributor

bors bot commented Feb 5, 2019

Build succeeded

@bors bors bot merged commit de4c5e3 into rust-lang:master Feb 5, 2019
@flodiebold flodiebold deleted the extern-crate branch February 24, 2019 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

handle extern crate in name resolution
2 participants