privacy: Mark everything in a header of a reachable impl as reachable

This commit is contained in:
Vadim Petrochenkov 2019-01-05 21:56:49 +03:00
parent 67713f5b7f
commit 9503c56ff7
6 changed files with 36 additions and 9 deletions

View file

@ -0,0 +1,10 @@
mod inner {
pub struct PubUnnameable;
impl PubUnnameable {
pub fn pub_method(self) {}
}
}
pub trait PubTraitWithSingleImplementor {}
impl PubTraitWithSingleImplementor for Option<inner::PubUnnameable> {}

View file

@ -0,0 +1,8 @@
// compile-pass
// aux-build:issue-57264-1.rs
extern crate issue_57264_1;
fn main() {
issue_57264_1::Pub::pub_method();
}

View file

@ -0,0 +1,10 @@
// compile-pass
// aux-build:issue-57264-2.rs
extern crate issue_57264_2;
fn infer<T: issue_57264_2::PubTraitWithSingleImplementor>(arg: T) -> T { arg }
fn main() {
infer(None).unwrap().pub_method();
}

View file

@ -1,8 +0,0 @@
// compile-pass
// aux-build:issue-57264.rs
extern crate issue_57264;
fn main() {
issue_57264::Pub::pub_method();
}