diff options
Diffstat (limited to 'crates/ra_hir/src/ty/infer')
-rw-r--r-- | crates/ra_hir/src/ty/infer/expr.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_hir/src/ty/infer/expr.rs b/crates/ra_hir/src/ty/infer/expr.rs index 57f845dfa..d9ea6da42 100644 --- a/crates/ra_hir/src/ty/infer/expr.rs +++ b/crates/ra_hir/src/ty/infer/expr.rs | |||
@@ -100,7 +100,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
100 | let projection = ProjectionPredicate { | 100 | let projection = ProjectionPredicate { |
101 | ty: pat_ty.clone(), | 101 | ty: pat_ty.clone(), |
102 | projection_ty: ProjectionTy { | 102 | projection_ty: ProjectionTy { |
103 | associated_ty: into_iter_item_alias.id, | 103 | associated_ty: into_iter_item_alias, |
104 | parameters: Substs::single(iterable_ty), | 104 | parameters: Substs::single(iterable_ty), |
105 | }, | 105 | }, |
106 | }; | 106 | }; |
@@ -230,7 +230,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
230 | } | 230 | } |
231 | }); | 231 | }); |
232 | if let Some(field_def) = field_def { | 232 | if let Some(field_def) = field_def { |
233 | self.result.record_field_resolutions.insert(field.expr, field_def); | 233 | self.result.record_field_resolutions.insert(field.expr, field_def.into()); |
234 | } | 234 | } |
235 | let field_ty = field_def | 235 | let field_ty = field_def |
236 | .map_or(Ty::Unknown, |it| field_types[it.id].clone()) | 236 | .map_or(Ty::Unknown, |it| field_types[it.id].clone()) |
@@ -262,7 +262,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
262 | self.db.struct_data(s).variant_data.field(name).map(|local_id| { | 262 | self.db.struct_data(s).variant_data.field(name).map(|local_id| { |
263 | let field = StructFieldId { parent: s.into(), local_id }.into(); | 263 | let field = StructFieldId { parent: s.into(), local_id }.into(); |
264 | self.write_field_resolution(tgt_expr, field); | 264 | self.write_field_resolution(tgt_expr, field); |
265 | self.db.field_types(s.into())[field.id] | 265 | self.db.field_types(s.into())[field.local_id] |
266 | .clone() | 266 | .clone() |
267 | .subst(&a_ty.parameters) | 267 | .subst(&a_ty.parameters) |
268 | }) | 268 | }) |
@@ -285,7 +285,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
285 | let projection = ProjectionPredicate { | 285 | let projection = ProjectionPredicate { |
286 | ty: ty.clone(), | 286 | ty: ty.clone(), |
287 | projection_ty: ProjectionTy { | 287 | projection_ty: ProjectionTy { |
288 | associated_ty: future_future_output_alias.id, | 288 | associated_ty: future_future_output_alias, |
289 | parameters: Substs::single(inner_ty), | 289 | parameters: Substs::single(inner_ty), |
290 | }, | 290 | }, |
291 | }; | 291 | }; |
@@ -304,7 +304,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
304 | let projection = ProjectionPredicate { | 304 | let projection = ProjectionPredicate { |
305 | ty: ty.clone(), | 305 | ty: ty.clone(), |
306 | projection_ty: ProjectionTy { | 306 | projection_ty: ProjectionTy { |
307 | associated_ty: ops_try_ok_alias.id, | 307 | associated_ty: ops_try_ok_alias, |
308 | parameters: Substs::single(inner_ty), | 308 | parameters: Substs::single(inner_ty), |
309 | }, | 309 | }, |
310 | }; | 310 | }; |
@@ -557,7 +557,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
557 | Some((ty, func)) => { | 557 | Some((ty, func)) => { |
558 | let ty = canonicalized_receiver.decanonicalize_ty(ty); | 558 | let ty = canonicalized_receiver.decanonicalize_ty(ty); |
559 | self.write_method_resolution(tgt_expr, func); | 559 | self.write_method_resolution(tgt_expr, func); |
560 | (ty, self.db.value_ty(func.id.into()), Some(self.db.generic_params(func.id.into()))) | 560 | (ty, self.db.value_ty(func.into()), Some(self.db.generic_params(func.into()))) |
561 | } | 561 | } |
562 | None => (receiver_ty, Ty::Unknown, None), | 562 | None => (receiver_ty, Ty::Unknown, None), |
563 | }; | 563 | }; |