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

Expand on the guide-level explanation #4

Merged
merged 1 commit into from
Mar 27, 2022

Conversation

epage
Copy link

@epage epage commented Mar 26, 2022

This is pulled from rust-lang#3243 (comment)

This shifted the guide to starting from the consumer of a namespace, as
that is the majority case, and then moving into the role of a crate
owner.

This leaves out details on feature flags to not duplicate a future "why
not feature flags" section.

This is pulled from rust-lang#3243 (comment)

This shifted the guide to starting from the consumer of a namespace, as
that is the majority case, and then moving into the role of a crate
owner.

This leaves out details on feature flags to not duplicate a future "why
not feature flags" section.
```

In case there is also an in-scope crate `foo` with an exported `bar` item, this will cause an ambiguity error unless both the item `foo::bar` and the crate `foo::bar` are actually resolving to the same item. This is similar to what rustc already does when it encounters in-use clashes in glob imports.
Some reasons for `foo`s owner to consider using namespaces:
- Avoid name conflicts with third-party authors (since they are reserved)
Copy link
Owner

Choose a reason for hiding this comment

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

I wonder if some of this should be duplicated in the motivation

@Manishearth Manishearth merged commit 4501047 into Manishearth:namespacing Mar 27, 2022
@epage epage deleted the guide branch March 28, 2022 13:03
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.

2 participants