diff options
author | Florian Diebold <[email protected]> | 2020-01-11 22:19:58 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2020-01-11 22:37:58 +0000 |
commit | 9dc1826cfaa75983a83f9eb7f788067d5dedf5a7 (patch) | |
tree | c92f033b4b97ee393dafb3a83537f47c4c82d435 /crates/ra_hir_def/src/nameres/collector.rs | |
parent | 2e09a96f82d4ba15de2c8b8fbbe40fd78e21c185 (diff) |
Fix various names, e.g. Iterator not resolving in core prelude
Basically, `Iterator` is re-exported via several steps, which happened to not be
resolved yet when we got to the prelude import, but since the name resolved to
the reexport from `core::iter` (just to no actual items), we gave up trying to
resolve it further.
Maybe part of the problem is that we can have
`PartialResolvedImport::Unresolved` or `PartialResolvedImport::Indeterminate`
with `None` in all namespaces, and handle them differently.
Fixes #2683.
Diffstat (limited to 'crates/ra_hir_def/src/nameres/collector.rs')
-rw-r--r-- | crates/ra_hir_def/src/nameres/collector.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs index 35b852ee2..7499dff31 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs | |||
@@ -328,7 +328,7 @@ where | |||
328 | ); | 328 | ); |
329 | 329 | ||
330 | let def = res.resolved_def; | 330 | let def = res.resolved_def; |
331 | if res.reached_fixedpoint == ReachedFixedPoint::No { | 331 | if res.reached_fixedpoint == ReachedFixedPoint::No || def.is_none() { |
332 | return PartialResolvedImport::Unresolved; | 332 | return PartialResolvedImport::Unresolved; |
333 | } | 333 | } |
334 | 334 | ||