diff options
| author | bors <bors@rust-lang.org> | 2015-12-11 04:27:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-12-11 04:27:53 +0000 |
| commit | 672a3d93e34ad52529f3bdedfd26d52d67824ccd (patch) | |
| tree | e8cdf1ecf16d6e3ad9b24857d180c0ff106d21ee /src/test/compile-fail/coherence-impl-trait-for-trait-object-safe.rs | |
| parent | ae5d09551e8a0777999aadb1aa804e43aeab0ff2 (diff) | |
| parent | ada87fae5f2fe1b2bc6e95ad7a6a730921c22161 (diff) | |
| download | rust-672a3d93e34ad52529f3bdedfd26d52d67824ccd.tar.gz rust-672a3d93e34ad52529f3bdedfd26d52d67824ccd.zip | |
Auto merge of #30294 - jseyfried:fix_shadowed_use_visibility, r=nrc
This fixes a bug in which the visibility of a use declaration defining a name in one namespace (e.g. the value namespace) is overridden by a later use declaration defining the same name in the other namespace (e.g. the type namespace). For example,
```rust
fn f() {}
pub mod bar {}
mod foo {
use f; // This import should not be visible outside `foo`,
pub use bar as f; // but it visible outside of `foo` because of this import.
}
fn main() { foo::f(); }
```
As the example demonstrates, this is a [breaking-change], but it looks unlikely to cause breakage in practice, and any breakage can be fixed by correcting visibility modifiers.
Diffstat (limited to 'src/test/compile-fail/coherence-impl-trait-for-trait-object-safe.rs')
0 files changed, 0 insertions, 0 deletions
