diff options
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 5edc59f18..905fe9f0e 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs | |||
@@ -462,7 +462,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
462 | let mut resolved = | 462 | let mut resolved = |
463 | if remaining_index.is_none() { def.take_values()? } else { def.take_types()? }; | 463 | if remaining_index.is_none() { def.take_values()? } else { def.take_types()? }; |
464 | 464 | ||
465 | let remaining_index = remaining_index.unwrap_or(path.segments.len()); | 465 | let remaining_index = remaining_index.unwrap_or_else(|| path.segments.len()); |
466 | let mut actual_def_ty: Option<Ty> = None; | 466 | let mut actual_def_ty: Option<Ty> = None; |
467 | 467 | ||
468 | let krate = resolver.krate()?; | 468 | let krate = resolver.krate()?; |