about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-02-11 04:27:13 +0000
committerbors <bors@rust-lang.org>2016-02-11 04:27:13 +0000
commit1de70d33f7baf12978cfb3de861e61b2a5d6fca7 (patch)
tree773c0d6ec989d8dfd5472b299b668b3b464671d8 /src/libstd/sys/unix/stack_overflow.rs
parent106070b905d1d312e19f7d0e439d1a7e78d3dc05 (diff)
parent3df40c09ec5efb74e16c3da84fef6ce142dae73a (diff)
downloadrust-1de70d33f7baf12978cfb3de861e61b2a5d6fca7.tar.gz
rust-1de70d33f7baf12978cfb3de861e61b2a5d6fca7.zip
Auto merge of #31461 - jseyfried:remove_import_resolutions, r=nrc
This PR adds to `NameBinding` so it can more fully represent bindings from imports as well from items, refactors away `Target`, generalizes `ImportResolution` to a simpler type `NameResolution`, and uses a single `NameResolution`-valued map in place the existing maps `children` and `import_resolutions` (of `NameBinding`s and `ImportResolution`s, respectively), simplifying duplicate checking and name resolution.

It also unifies the `resolve_name_in_module` in `lib.rs` with its namesake in `resolve_imports.rs`, clarifying and improving the core logic (fixes #31403 and fixes #31404) while maintaining clear future-comparability with shadowable globs (i.e., never reporting that a resolution is a `Success` or is `Failing` unless this would also be knowable with shadowable globs).

Since it fixes #31403, this is technically a [breaking-change], but it is exceedingly unlikely to cause breakage in practice. The following is an example of code that would break:
```rust
mod foo {
    pub mod bar {} // This defines bar in the type namespace
    pub use alpha::bar; // This defines bar in the value namespace

    // This should define baz in both namespaces, but it only defines baz in the type namespace.
    pub use self::bar as baz;
    pub fn baz() {} // This should collide with baz, but now it does not.
}

pub fn f() {}
mod alpha {
    pub use self::f as bar; // Changing this to `pub fn bar() {}` causes the collision right now.
    pub use super::*;
}
```

r? @nrc
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions