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