aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-02-02 12:43:04 +0000
committerFlorian Diebold <[email protected]>2020-02-07 17:28:10 +0000
commit86348f5994cdc3831edf3a5582d6d9d576fd1d80 (patch)
treed630646508fcf2422026178f0a0c707ff828e2bd
parent3397ca679fb0156c9f102ab82354e2bcef5f4dd1 (diff)
Comment fixes / todos
-rw-r--r--crates/ra_hir_ty/src/infer/expr.rs1
-rw-r--r--crates/ra_hir_ty/src/lib.rs2
-rw-r--r--crates/ra_hir_ty/src/lower.rs11
3 files changed, 8 insertions, 6 deletions
diff --git a/crates/ra_hir_ty/src/infer/expr.rs b/crates/ra_hir_ty/src/infer/expr.rs
index 8b8378499..b32df8e90 100644
--- a/crates/ra_hir_ty/src/infer/expr.rs
+++ b/crates/ra_hir_ty/src/infer/expr.rs
@@ -587,6 +587,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
587 self.write_method_resolution(tgt_expr, func); 587 self.write_method_resolution(tgt_expr, func);
588 (ty, self.db.value_ty(func.into()), Some(generics(self.db, func.into()))) 588 (ty, self.db.value_ty(func.into()), Some(generics(self.db, func.into())))
589 } 589 }
590 // TODO fix this
590 None => (receiver_ty, Binders::new(0, Ty::Unknown), None), 591 None => (receiver_ty, Binders::new(0, Ty::Unknown), None),
591 }; 592 };
592 let substs = self.substs_for_method_call(def_generics, generic_args, &derefed_receiver_ty); 593 let substs = self.substs_for_method_call(def_generics, generic_args, &derefed_receiver_ty);
diff --git a/crates/ra_hir_ty/src/lib.rs b/crates/ra_hir_ty/src/lib.rs
index 6eccd7fa8..1da4bcc19 100644
--- a/crates/ra_hir_ty/src/lib.rs
+++ b/crates/ra_hir_ty/src/lib.rs
@@ -288,10 +288,12 @@ pub enum Ty {
288 Projection(ProjectionTy), 288 Projection(ProjectionTy),
289 289
290 /// A type parameter; for example, `T` in `fn f<T>(x: T) {} 290 /// A type parameter; for example, `T` in `fn f<T>(x: T) {}
291 // TODO fix documentation
291 Param(TypeParamId), 292 Param(TypeParamId),
292 293
293 /// A bound type variable. Used during trait resolution to represent Chalk 294 /// A bound type variable. Used during trait resolution to represent Chalk
294 /// variables, and in `Dyn` and `Opaque` bounds to represent the `Self` type. 295 /// variables, and in `Dyn` and `Opaque` bounds to represent the `Self` type.
296 // TODO fix documentation
295 Bound(u32), 297 Bound(u32),
296 298
297 /// A type variable used during type checking. Not to be confused with a 299 /// A type variable used during type checking. Not to be confused with a
diff --git a/crates/ra_hir_ty/src/lower.rs b/crates/ra_hir_ty/src/lower.rs
index e375c4847..76e2fbabf 100644
--- a/crates/ra_hir_ty/src/lower.rs
+++ b/crates/ra_hir_ty/src/lower.rs
@@ -37,10 +37,9 @@ pub struct TyLoweringContext<'a, DB: HirDatabase> {
37 pub db: &'a DB, 37 pub db: &'a DB,
38 pub resolver: &'a Resolver, 38 pub resolver: &'a Resolver,
39 /// Note: Conceptually, it's thinkable that we could be in a location where 39 /// Note: Conceptually, it's thinkable that we could be in a location where
40 /// some type params are quantified universally (and should be represented 40 /// some type params should be represented as placeholders, and others
41 /// as placeholders), and others are quantified existentially (and should be 41 /// should be converted to variables. I think in practice, this isn't
42 /// converted to variables). I think in practice, this isn't possible 42 /// possible currently, so this should be fine for now.
43 /// currently, so this should be fine for now.
44 pub type_param_mode: TypeParamLoweringMode, 43 pub type_param_mode: TypeParamLoweringMode,
45 pub impl_trait_mode: ImplTraitLoweringMode, 44 pub impl_trait_mode: ImplTraitLoweringMode,
46 pub impl_trait_counter: std::cell::Cell<u16>, 45 pub impl_trait_counter: std::cell::Cell<u16>,
@@ -71,8 +70,8 @@ pub enum ImplTraitLoweringMode {
71 /// types of functions we're calling. 70 /// types of functions we're calling.
72 Opaque, 71 Opaque,
73 /// `impl Trait` gets lowered into a type variable. Used for argument 72 /// `impl Trait` gets lowered into a type variable. Used for argument
74 /// position impl Trait currently, since it allows us to support that 73 /// position impl Trait when inside the respective function, since it allows
75 /// without Chalk. 74 /// us to support that without Chalk.
76 Param, 75 Param,
77 /// `impl Trait` gets lowered into a variable that can unify with some 76 /// `impl Trait` gets lowered into a variable that can unify with some
78 /// type. This is used in places where values flow 'in', i.e. for arguments 77 /// type. This is used in places where values flow 'in', i.e. for arguments