Skip to content

Commit d5d00a3

Browse files
authored
Merge pull request #21725 from Veykril/push-skvpqzkooolm
fix: Fix wrong confiditon in `Visibility::min`
2 parents fbc7b76 + d85bc7c commit d5d00a3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/hir-def/src/visibility.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ impl Visibility {
234234
if mod_.krate(db) == krate { Some(Visibility::Module(mod_, exp)) } else { None }
235235
}
236236
(Visibility::Module(mod_a, expl_a), Visibility::Module(mod_b, expl_b)) => {
237-
if mod_a.krate(db) != mod_b.krate(db) {
237+
if mod_a == mod_b {
238238
// Most module visibilities are `pub(self)`, and assuming no errors
239239
// this will be the common and thus fast path.
240240
return Some(Visibility::Module(

0 commit comments

Comments
 (0)