Skip to content

Commit

Permalink
Merge pull request rust-lang#8 from epage/summary
Browse files Browse the repository at this point in the history
Update summary to focus on `::` semantics
  • Loading branch information
Manishearth authored Mar 29, 2022
2 parents 3396a2e + 11c6354 commit cc5872d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions text/0000-packages-as-optional-namespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

# Summary

Grant exclusive access to publishing crates `parent::foo` for owners of crate `parent`.
Languages like C++ have open namespaces where anyone can write code in any namespace. In C++'s case, this includes the `std` namespace and is only limited by convention. In contrast, Rust has closed namespaces which can only include code from the original namespace definition (the crate).

Namespaced crates can be named in Rust code with their full name (`parent::foo`).
This proposal extends Rust to have partially open namespaces by allowing crate owners to create crates like `parent:foo` that will be available as part of the crate `parent`'s namespace. To protect the use of open namepsaces, the owners of `parent` has exclusive access to publishing crates in that namespace.

# Motivation

Expand Down

0 comments on commit cc5872d

Please sign in to comment.