diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-01-13 05:26:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-13 05:26:59 +0100 |
| commit | c04d6fa08450831ef26ad27b73345b8bbb0ac9fb (patch) | |
| tree | 3bfaaa74a14b6933a220efb75ca71659350c3ab0 /src/librustc_resolve | |
| parent | 8c1813d3e12e61f4d53e0d997bb0747f557062ff (diff) | |
| parent | 6aa78563697245ff7835a57c7e7eb331e9ecec08 (diff) | |
Rollup merge of #57557 - petrochenkov:ecused, r=varkor
resolve: Mark extern crate items as used in more cases Fixes https://github.com/rust-lang/rust/issues/57421
Diffstat (limited to 'src/librustc_resolve')
| -rw-r--r-- | src/librustc_resolve/lib.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 7c05913467c..f7a82c7bf4a 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -5112,6 +5112,9 @@ impl<'a> Resolver<'a> { } self.extern_prelude.get(&ident.modern()).cloned().and_then(|entry| { if let Some(binding) = entry.extern_crate_item { + if !speculative && entry.introduced_by_item { + self.record_use(ident, TypeNS, binding, false); + } Some(binding) } else { let crate_id = if !speculative { |
