Skip to content

Commit

Permalink
Support importing inaccessible extern crates with a warning again.
Browse files Browse the repository at this point in the history
  • Loading branch information
jseyfried committed Oct 7, 2016
1 parent 75c155b commit dd19bf0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/librustc_resolve/resolve_imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ impl<'a> Resolver<'a> {
// If the resolution doesn't depend on glob definability, check privacy and return.
if let Some(result) = self.try_result(&resolution, ns) {
return result.and_then(|binding| {
if self.is_accessible(binding.vis) && !is_disallowed_private_import(binding) {
if self.is_accessible(binding.vis) && !is_disallowed_private_import(binding) ||
binding.is_extern_crate() { // c.f. issue #37020
Success(binding)
} else {
Failed(None)
Expand Down

0 comments on commit dd19bf0

Please sign in to comment.