Description
Spawned off of #38689
There are still some cases where referencing an inaccessible item can cause the compiler to ICE.
Here is one crafted example (playpen)
fn main() {
let a = std::sys::imp::process::process_common::StdioPipes { ..panic!() };
}
but if std
's module structure is revised then that example may fail to compile without ICE'ing for other reasons, so take care in understanding the issue: the change introduced by #38689 is skipping the requirement for stability attributes is slightly too narrow, in that it uses a local notion of pub/non-pub instead of overall accessibility.
One simple solution to this may be to just follow the suggestion here #38689 (comment) and just remove the assertion entirely. (I did not want to adopt that solution for a PR to be backported to beta, but I think it is worth considering doing in nightly alone to resolve this low priority issue.)