aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/lower.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-04-07 20:26:24 +0100
committerFlorian Diebold <[email protected]>2021-04-08 13:08:55 +0100
commitb25b147e8604f62a5620a5833112e358ebeeb287 (patch)
tree9f5d3249d633c12e4908bc7cbcd0ba4f1c6ac833 /crates/hir_ty/src/lower.rs
parentdc0b5817366f9b7b99a1a1f6e69ca7ac63e9ed0f (diff)
Fix shifted_{in,out} calls
Diffstat (limited to 'crates/hir_ty/src/lower.rs')
-rw-r--r--crates/hir_ty/src/lower.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs
index d4ba707b4..b45e811fa 100644
--- a/crates/hir_ty/src/lower.rs
+++ b/crates/hir_ty/src/lower.rs
@@ -8,7 +8,7 @@
8use std::{iter, sync::Arc}; 8use std::{iter, sync::Arc};
9 9
10use base_db::CrateId; 10use base_db::CrateId;
11use chalk_ir::{cast::Cast, interner::HasInterner, Mutability, Safety}; 11use chalk_ir::{cast::Cast, fold::Shift, interner::HasInterner, Mutability, Safety};
12use hir_def::{ 12use hir_def::{
13 adt::StructKind, 13 adt::StructKind,
14 builtin_type::BuiltinType, 14 builtin_type::BuiltinType,
@@ -488,7 +488,7 @@ impl<'a> TyLoweringContext<'a> {
488 }; 488 };
489 // We need to shift in the bound vars, since 489 // We need to shift in the bound vars, since
490 // associated_type_shorthand_candidates does not do that 490 // associated_type_shorthand_candidates does not do that
491 let substs = substs.shifted_in_from(self.in_binders); 491 let substs = substs.shifted_in_from(&Interner, self.in_binders);
492 // FIXME handle type parameters on the segment 492 // FIXME handle type parameters on the segment
493 return Some( 493 return Some(
494 TyKind::Alias(AliasTy::Projection(ProjectionTy { 494 TyKind::Alias(AliasTy::Projection(ProjectionTy {
@@ -847,7 +847,7 @@ pub fn associated_type_shorthand_candidates<R>(
847 // FIXME: how to correctly handle higher-ranked bounds here? 847 // FIXME: how to correctly handle higher-ranked bounds here?
848 WhereClause::Implemented(tr) => search( 848 WhereClause::Implemented(tr) => search(
849 tr.clone() 849 tr.clone()
850 .shifted_out_to(DebruijnIndex::ONE) 850 .shifted_out_to(&Interner, DebruijnIndex::ONE)
851 .expect("FIXME unexpected higher-ranked trait bound"), 851 .expect("FIXME unexpected higher-ranked trait bound"),
852 ), 852 ),
853 _ => None, 853 _ => None,