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

Allow for :: prefixes in _any_ call path, not just imports. #75

Closed
sezna opened this issue Jun 7, 2021 · 2 comments · Fixed by #472
Closed

Allow for :: prefixes in _any_ call path, not just imports. #75

sezna opened this issue Jun 7, 2021 · 2 comments · Fixed by #472
Assignees
Labels
compiler General compiler. Should eventually become more specific as the issue is triaged

Comments

@sezna
Copy link
Contributor

sezna commented Jun 7, 2021

Right now, you can use from the root of a project like this:

use ::foo::Foo;

You cannot directly refer to something like this:

let my_enum = ::foo::MyEnum;

It isn't hard, it just needs to be done. The place to implement this would be in the places where false is passed directly in to find_module.

@adlerjohn adlerjohn added the compiler General compiler. Should eventually become more specific as the issue is triaged label Jun 14, 2021
@emilyaherbert
Copy link
Contributor

I think I have gotten myself turned around... what does the prefixed "::" indicate? As opposed to let my_enum = foo::MyEnum;.

@sezna
Copy link
Contributor Author

sezna commented Dec 17, 2021

It's an absolute path instead of a relative one. I.e., similar to rust's crate::foo::bar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler General compiler. Should eventually become more specific as the issue is triaged
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants