From dd19bf0843113904e9763d55207e3be9120756df Mon Sep 17 00:00:00 2001 From: Jeffrey Seyfried Date: Fri, 7 Oct 2016 07:35:43 +0000 Subject: [PATCH] Support importing inaccessible `extern crate`s with a warning again. --- src/librustc_resolve/resolve_imports.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/librustc_resolve/resolve_imports.rs b/src/librustc_resolve/resolve_imports.rs index 4689c4ded5c..e33668b6fe9 100644 --- a/src/librustc_resolve/resolve_imports.rs +++ b/src/librustc_resolve/resolve_imports.rs @@ -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)