diff options
author | Florian Diebold <[email protected]> | 2020-06-19 17:32:42 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2020-06-19 21:07:58 +0100 |
commit | 170cdf90769d7a2779ffd0a8cb552e5b2f63d11c (patch) | |
tree | d0930615d22a99de16b502ea99409cca5313c922 /crates/ra_hir_ty/src/lower.rs | |
parent | 1d4388f6bd02e6dda816028f0bdac7b39225ca0b (diff) |
Shift bound variables correctly when using assoc type shorthand
Fixes #4885.
Fixes #4800.
Diffstat (limited to 'crates/ra_hir_ty/src/lower.rs')
-rw-r--r-- | crates/ra_hir_ty/src/lower.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_hir_ty/src/lower.rs b/crates/ra_hir_ty/src/lower.rs index 7a7fcb0ab..d5154f436 100644 --- a/crates/ra_hir_ty/src/lower.rs +++ b/crates/ra_hir_ty/src/lower.rs | |||
@@ -467,6 +467,9 @@ impl Ty { | |||
467 | } | 467 | } |
468 | TypeParamLoweringMode::Variable => t.substs.clone(), | 468 | TypeParamLoweringMode::Variable => t.substs.clone(), |
469 | }; | 469 | }; |
470 | // We need to shift in the bound vars, since | ||
471 | // associated_type_shorthand_candidates does not do that | ||
472 | let substs = substs.shift_bound_vars(ctx.in_binders); | ||
470 | // FIXME handle type parameters on the segment | 473 | // FIXME handle type parameters on the segment |
471 | return Some(Ty::Projection(ProjectionTy { | 474 | return Some(Ty::Projection(ProjectionTy { |
472 | associated_ty, | 475 | associated_ty, |