]> git.lizzy.rs Git - rust.git/commit
Auto merge of #27547 - vberger:more_perseverant_resolve, r=nrc
authorbors <bors@rust-lang.org>
Mon, 10 Aug 2015 14:40:07 +0000 (14:40 +0000)
committerbors <bors@rust-lang.org>
Mon, 10 Aug 2015 14:40:07 +0000 (14:40 +0000)
commit1db1417736fa9d682fb0c3e36d37c123c2944a17
tree87e29f259f0cbf778dd2dcd32dbc33cbd1212c74
parenta136d4c95f2d927f327713d432421c47ee90df77
parent5847ea76195d9cbe9d066418bdf44ba2a0398649
Auto merge of #27547 - vberger:more_perseverant_resolve, r=nrc

As noted in my previous PR #27439 , the import resolution algorithm has two cases where it bails out:

- The algorithm will delay an import if the module containing the target of the import still has unresolved glob imports
- The algorithm will delay a glob import of the target module still has unresolved imports

This PR alters the behaviour to only bail out when the above described unresolved imports are `pub`, as non-pub imports don't affect the result anyway.

It is still possible to fail the algorithm with examples like
```rust
pub mod a {
    pub use b::*;
}

pub mod b {
    pub use a::*;
}
```
but such configurations cannot be resolved in any meaningful way, as these are cyclic imports.

Closes #4865
src/librustc_resolve/build_reduced_graph.rs