41e0363055
privacy: Fix more (potential) issues with effective visibilities Continuation of https://github.com/rust-lang/rust/pull/103965. See individual commits for more detailed description of the changes. The shortcuts removed in4eb63f618e
andc7c7d16727
could actually be correct (or correct after some tweaks), but they used global reasoning like "we can skip this update because if the code compiles then some other update should do the same thing eventually". I have some expertise in this area, but I still have doubt whether such global reasoning was correct or not, especially in presence of all possible exotic cases with imports. After this PR all table changes should be "locally correct" after every update, even if it may be overcautious. If similar optimizations are introduced again they will need detailed comments explaining why it's legal to do what they do and providing proofs. Fixes https://github.com/rust-lang/rust/issues/104249. Fixes https://github.com/rust-lang/rust/issues/104539.