-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
handle extern crate
in name resolution
#523
Comments
extern crate
in name resolution
Shouldn't be too hard to fix:
|
@matklad I've got a branch which does handle extern crate alloc as alloc_crate;
mod sync; sync.rs: pub use alloc_crate::sync::Arc; In general, even in the 2018 edition, plain paths can be resolved either from the current scope or from the crate root. |
Just checked locally, and it seems that on 2018 |
Hm, you're right, it just works for |
I think |
Yup, rust-lang/rust#54658 |
Though |
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 <flodiebold@gmail.com>
Currently,
std::sync::Arc
cannot be resolved.In #522 (comment), @flodiebold speculates:
Here's a simple test case:
The text was updated successfully, but these errors were encountered: