Skip to content

Commit de0de61

Browse files
committed
Partially undo the fix of issue #30159 in PR #30294 to avoid breakage.
1 parent 81dd382 commit de0de61

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/librustc_resolve/resolve_imports.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,9 @@ impl<'a, 'b:'a, 'tcx:'b> ImportResolver<'a, 'b, 'tcx> {
871871
is_public: is_public
872872
};
873873
}
874+
} else {
875+
// FIXME #30159: This is required for backwards compatability.
876+
dest_import_resolution[namespace].is_public |= is_public;
874877
}
875878
};
876879
merge_child_item(ValueNS);

src/test/compile-fail/shadowed-use-visibility.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ mod foo {
1717

1818
mod bar {
1919
use foo::bar::f as g; //~ ERROR unresolved import
20-
21-
use foo as f;
22-
pub use foo::*;
2320
}
2421

25-
use bar::f::f; //~ ERROR unresolved import
2622
fn main() {}

0 commit comments

Comments
 (0)