45f0ce71c1
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 |
||
---|---|---|
.. | ||
bootstrap | ||
build_helper | ||
compiler-rt@b6087e82ba | ||
compiletest | ||
doc | ||
driver | ||
error_index_generator | ||
etc | ||
grammar | ||
jemalloc@aab1c0a0e0 | ||
liballoc | ||
liballoc_jemalloc | ||
liballoc_system | ||
libarena | ||
libbacktrace | ||
libcollections | ||
libcollectionstest | ||
libcore | ||
libcoretest | ||
libflate | ||
libfmt_macros | ||
libgetopts | ||
libgraphviz | ||
liblibc@07a9206793 | ||
liblog | ||
librand | ||
librbml | ||
librustc | ||
librustc_back | ||
librustc_bitflags | ||
librustc_borrowck | ||
librustc_data_structures | ||
librustc_driver | ||
librustc_front | ||
librustc_lint | ||
librustc_llvm | ||
librustc_metadata | ||
librustc_mir | ||
librustc_passes | ||
librustc_platform_intrinsics | ||
librustc_plugin | ||
librustc_privacy | ||
librustc_resolve | ||
librustc_trans | ||
librustc_typeck | ||
librustc_unicode | ||
librustdoc | ||
libserialize | ||
libstd | ||
libsyntax | ||
libsyntax_ext | ||
libterm | ||
libtest | ||
llvm@69ef168544 | ||
rt | ||
rtstartup | ||
rust-installer@c37d3747da | ||
rustbook | ||
rustc | ||
rustllvm | ||
test | ||
nightlies.txt | ||
snapshots.txt |