Comment fixes / todos
This commit is contained in:
parent
3397ca679f
commit
86348f5994
@ -587,6 +587,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
|
||||
self.write_method_resolution(tgt_expr, func);
|
||||
(ty, self.db.value_ty(func.into()), Some(generics(self.db, func.into())))
|
||||
}
|
||||
// TODO fix this
|
||||
None => (receiver_ty, Binders::new(0, Ty::Unknown), None),
|
||||
};
|
||||
let substs = self.substs_for_method_call(def_generics, generic_args, &derefed_receiver_ty);
|
||||
|
@ -288,10 +288,12 @@ pub enum Ty {
|
||||
Projection(ProjectionTy),
|
||||
|
||||
/// A type parameter; for example, `T` in `fn f<T>(x: T) {}
|
||||
// TODO fix documentation
|
||||
Param(TypeParamId),
|
||||
|
||||
/// A bound type variable. Used during trait resolution to represent Chalk
|
||||
/// variables, and in `Dyn` and `Opaque` bounds to represent the `Self` type.
|
||||
// TODO fix documentation
|
||||
Bound(u32),
|
||||
|
||||
/// A type variable used during type checking. Not to be confused with a
|
||||
|
@ -37,10 +37,9 @@ pub struct TyLoweringContext<'a, DB: HirDatabase> {
|
||||
pub db: &'a DB,
|
||||
pub resolver: &'a Resolver,
|
||||
/// Note: Conceptually, it's thinkable that we could be in a location where
|
||||
/// some type params are quantified universally (and should be represented
|
||||
/// as placeholders), and others are quantified existentially (and should be
|
||||
/// converted to variables). I think in practice, this isn't possible
|
||||
/// currently, so this should be fine for now.
|
||||
/// some type params should be represented as placeholders, and others
|
||||
/// should be converted to variables. I think in practice, this isn't
|
||||
/// possible currently, so this should be fine for now.
|
||||
pub type_param_mode: TypeParamLoweringMode,
|
||||
pub impl_trait_mode: ImplTraitLoweringMode,
|
||||
pub impl_trait_counter: std::cell::Cell<u16>,
|
||||
@ -71,8 +70,8 @@ pub enum ImplTraitLoweringMode {
|
||||
/// types of functions we're calling.
|
||||
Opaque,
|
||||
/// `impl Trait` gets lowered into a type variable. Used for argument
|
||||
/// position impl Trait currently, since it allows us to support that
|
||||
/// without Chalk.
|
||||
/// position impl Trait when inside the respective function, since it allows
|
||||
/// us to support that without Chalk.
|
||||
Param,
|
||||
/// `impl Trait` gets lowered into a variable that can unify with some
|
||||
/// type. This is used in places where values flow 'in', i.e. for arguments
|
||||
|
Loading…
x
Reference in New Issue
Block a user