Skip to content

Commit 86348f5

Browse files
committed
Comment fixes / todos
1 parent 3397ca6 commit 86348f5

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

crates/ra_hir_ty/src/infer/expr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
587587
self.write_method_resolution(tgt_expr, func);
588588
(ty, self.db.value_ty(func.into()), Some(generics(self.db, func.into())))
589589
}
590+
// TODO fix this
590591
None => (receiver_ty, Binders::new(0, Ty::Unknown), None),
591592
};
592593
let substs = self.substs_for_method_call(def_generics, generic_args, &derefed_receiver_ty);

crates/ra_hir_ty/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,12 @@ pub enum Ty {
288288
Projection(ProjectionTy),
289289

290290
/// A type parameter; for example, `T` in `fn f<T>(x: T) {}
291+
// TODO fix documentation
291292
Param(TypeParamId),
292293

293294
/// A bound type variable. Used during trait resolution to represent Chalk
294295
/// variables, and in `Dyn` and `Opaque` bounds to represent the `Self` type.
296+
// TODO fix documentation
295297
Bound(u32),
296298

297299
/// A type variable used during type checking. Not to be confused with a

crates/ra_hir_ty/src/lower.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ pub struct TyLoweringContext<'a, DB: HirDatabase> {
3737
pub db: &'a DB,
3838
pub resolver: &'a Resolver,
3939
/// Note: Conceptually, it's thinkable that we could be in a location where
40-
/// some type params are quantified universally (and should be represented
41-
/// as placeholders), and others are quantified existentially (and should be
42-
/// converted to variables). I think in practice, this isn't possible
43-
/// currently, so this should be fine for now.
40+
/// some type params should be represented as placeholders, and others
41+
/// should be converted to variables. I think in practice, this isn't
42+
/// possible currently, so this should be fine for now.
4443
pub type_param_mode: TypeParamLoweringMode,
4544
pub impl_trait_mode: ImplTraitLoweringMode,
4645
pub impl_trait_counter: std::cell::Cell<u16>,
@@ -71,8 +70,8 @@ pub enum ImplTraitLoweringMode {
7170
/// types of functions we're calling.
7271
Opaque,
7372
/// `impl Trait` gets lowered into a type variable. Used for argument
74-
/// position impl Trait currently, since it allows us to support that
75-
/// without Chalk.
73+
/// position impl Trait when inside the respective function, since it allows
74+
/// us to support that without Chalk.
7675
Param,
7776
/// `impl Trait` gets lowered into a variable that can unify with some
7877
/// type. This is used in places where values flow 'in', i.e. for arguments

0 commit comments

Comments
 (0)