diff options
| author | bors <bors@rust-lang.org> | 2016-03-06 02:29:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-03-06 02:29:34 +0000 |
| commit | 45f0ce71c19d8da081714dc917f11a8cc02d15be (patch) | |
| tree | 80b760addf4deae8de33b8c783ea53e374fb36f5 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 52e0bda644823089f16795cc9e071cf827b4810b (diff) | |
| parent | d908ff1759bf27a8a8a99f113a246b8abc61f425 (diff) | |
| download | rust-45f0ce71c19d8da081714dc917f11a8cc02d15be.tar.gz rust-45f0ce71c19d8da081714dc917f11a8cc02d15be.zip | |
Auto merge of #31920 - jseyfried:fix_spurious_privacy_error, r=nikomatsakis
This PR allows using methods from traits that are visible but are defined in an inaccessible module (fixes #18241). For example,
```rust
mod foo {
pub use foo::bar::Tr;
mod bar { // This module is inaccessible from `g`
pub trait Tr { fn f(&self) {} }
}
}
fn g<T: foo::Tr>(t: T) {
t.f(); // Currently, this is a privacy error even though `foo::Tr` is visible
}
```
After this PR, it will continue to be a privacy error to use a method from a trait that is not visible. This can happen when a public trait inherits from a private trait (in violation of the `public_in_private` lint) -- see @petrochenkov's example in #28504.
r? @nikomatsakis
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
