Skip to content

Commit dd19bf0

Browse files
committed
Support importing inaccessible extern crates with a warning again.
1 parent 75c155b commit dd19bf0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc_resolve/resolve_imports.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ impl<'a> Resolver<'a> {
197197
// If the resolution doesn't depend on glob definability, check privacy and return.
198198
if let Some(result) = self.try_result(&resolution, ns) {
199199
return result.and_then(|binding| {
200-
if self.is_accessible(binding.vis) && !is_disallowed_private_import(binding) {
200+
if self.is_accessible(binding.vis) && !is_disallowed_private_import(binding) ||
201+
binding.is_extern_crate() { // c.f. issue #37020
201202
Success(binding)
202203
} else {
203204
Failed(None)

0 commit comments

Comments
 (0)