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

Non-module extern crate is not visible to imports #24219

Closed
nrc opened this issue Apr 9, 2015 · 4 comments
Closed

Non-module extern crate is not visible to imports #24219

nrc opened this issue Apr 9, 2015 · 4 comments
Labels
A-resolve Area: Path resolution

Comments

@nrc
Copy link
Member

nrc commented Apr 9, 2015

fn main() {
    extern crate core;
    use core::cell;
}

Should work but doesn't. Note that it is only imports that seem to be affected, in the above example, using core in a path in a type or expression work fine.

@nrc nrc added the A-resolve Area: Path resolution label Apr 9, 2015
@ftxqxd
Copy link
Contributor

ftxqxd commented Apr 9, 2015

I think the example in the issue is the intended behaviour, as use accepts a global path, while everything else uses a local path by default. self normally lets you use a local path in use, though, but that doesn't work either, so I guess this is a real bug.

@sfackler
Copy link
Member

sfackler commented Apr 9, 2015

cc #18084

@nrc
Copy link
Member Author

nrc commented Apr 9, 2015

So, since use always uses absolute paths, fixing #18084 seems to be the way to resolve this.

@glaebhoerl
Copy link
Contributor

See also rust-lang/rfcs#959.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-resolve Area: Path resolution
Projects
None yet
Development

No branches or pull requests

4 participants