about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-11-11 12:32:21 +0000
committerbors <bors@rust-lang.org>2022-11-11 12:32:21 +0000
commit57cc2a6e27cf2a961623cdde0ee06ca685e34e13 (patch)
treea53793cb4b7a51fdf255d541f53cbb9ef2fc107c /compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp
parent6f313cef8e9afda1172134bceb0dbf7c6362709e (diff)
parent19306c070d5deb8afa6e9da21fcf22e5b7e24a11 (diff)
downloadrust-57cc2a6e27cf2a961623cdde0ee06ca685e34e13.tar.gz
rust-57cc2a6e27cf2a961623cdde0ee06ca685e34e13.zip
Auto merge of #13602 - lowr:fix/nameres-transitive-visibility, r=Veykril
fix: check visibility of each path segment

Upon path resolution, we have not been checking if every def pointed to by each segment of the path is visible from the original module. This leads to incorrect import resolutions, in particular when one uses glob imports and names collide.

There is decent amount of changes in this PR because:
- some of our tests were not correct in terms of visibility
  - I left several basic nameres tests as-is (with expect test updated) since I thought it would be nice to ensure we don't resolve defs that are not visible.
- `fix_visibility` assist relied on `Semantics::resolve_path()`, which uses the name resolution procedure I'm fixing and wouldn't be able to "see through" the items with strict visibility with this patch

The first commit is the gist of the fix itself.

Fixes #10991
Fixes #11473
Fixes #13252
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp')
0 files changed, 0 insertions, 0 deletions