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

Rewrite Use Import subchapter #436

Merged
merged 2 commits into from
Aug 9, 2023
Merged

Rewrite Use Import subchapter #436

merged 2 commits into from
Aug 9, 2023

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Aug 7, 2023

Fixes #324
Fixes #323

with :t:`public visibility` prefixed by its :t:`simple path prefix` into
:t:`scope`.
exported by the :t:`module` or :t:`enum` its :t:`import path prefix` resolves to
into :t:`scope`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is quite hard to understand: "
"A glob import is a use import that brings all entities exported by the module or enum its import path prefix resolves to into scope."
Do you mean it brings all modules pointed to by the import path prefix into scope?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it brings all entities into scope that are exported in the module or enum that the path prefix resolves to, that is

foo::bar::*

imports everything from the foo::bar module (or enum)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is clear to you, then that is good enough.

@Dajamante
Copy link

bors merge

@bors-ferrocene
Copy link
Contributor

bors-ferrocene bot commented Aug 9, 2023

Build succeeded:

@Veykril Veykril merged commit da3a765 into main Aug 9, 2023
1 check passed
@Veykril Veykril deleted the use-imports branch August 9, 2023 11:37
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.

Explain trailing self import semantics (e.g. use foo::{self};) Explain underscore renames in imports
2 participants