about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-09-01 19:03:27 -0700
committerGitHub <noreply@github.com>2016-09-01 19:03:27 -0700
commit8aeb15acc73311ea4308e74a166ba3c0b261c810 (patch)
tree2b1cc7b3cc199c1e94e13f2a3b1f9681f97b9d7d /src/rustllvm/RustWrapper.cpp
parent497d67d708e5e54344efc10f9c16ea83b215da9e (diff)
parent90ce504c1c3dc014ca8e0aa91e21c46569a9d4ab (diff)
downloadrust-8aeb15acc73311ea4308e74a166ba3c0b261c810.tar.gz
rust-8aeb15acc73311ea4308e74a166ba3c0b261c810.zip
Auto merge of #35894 - jseyfried:new_import_semantics, r=nrc
Implement RFC 1560 behind `#![feature(item_like_imports)]`

This implements https://github.com/rust-lang/rfcs/pull/1560 (cc #35120) behind the `item_like_imports` feature gate.

The [RFC text](https://github.com/rust-lang/rfcs/blob/master/text/1560-name-resolution.md#changes-to-name-resolution-rules) describes the changes to name resolution enabled by `#![feature(item_like_imports)` in detail. To summarize,
 - Items and named imports shadow glob imports.
 - Multiple globs can import the same name if the name is unused or the imports are shadowed.
 - Multiple globs can import the same name if the imports are of the same item (following re-exports).
  - The visibility of such a name is the maximum visibility of the imports.
  - Equivalently, adding a glob import will never reduce the visibility of a name, nor will removing one increase it.
 - Non-prelude private imports can be used wherever we currently allow private items to be used.
  - Prelude-imported names are unaffected, i.e. they continue to be usable only in lexical scopes.
 - Globs import all visible names, not just public names.
  - Equivalently, glob importing from an ancestor module imports all of the ancestor's names, and glob importing from other modules is unchanged.

r? @nrc
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions