diff options
Diffstat (limited to 'crates/ra_hir_ty/src/lib.rs')
-rw-r--r-- | crates/ra_hir_ty/src/lib.rs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/crates/ra_hir_ty/src/lib.rs b/crates/ra_hir_ty/src/lib.rs index 68c2f0b06..c5fe18c85 100644 --- a/crates/ra_hir_ty/src/lib.rs +++ b/crates/ra_hir_ty/src/lib.rs | |||
@@ -287,17 +287,20 @@ pub enum Ty { | |||
287 | /// trait and all its parameters are fully known. | 287 | /// trait and all its parameters are fully known. |
288 | Projection(ProjectionTy), | 288 | Projection(ProjectionTy), |
289 | 289 | ||
290 | /// A type parameter; for example, `T` in `fn f<T>(x: T) {} | 290 | /// A placeholder for a type parameter; for example, `T` in `fn f<T>(x: T) |
291 | // TODO fix documentation | 291 | /// {}` when we're type-checking the body of that function. In this |
292 | /// situation, we know this stands for *some* type, but don't know the exact | ||
293 | /// type. | ||
292 | Param(TypeParamId), | 294 | Param(TypeParamId), |
293 | 295 | ||
294 | /// A bound type variable. Used during trait resolution to represent Chalk | 296 | /// A bound type variable. This is used in various places: when representing |
295 | /// variables, and in `Dyn` and `Opaque` bounds to represent the `Self` type. | 297 | /// some polymorphic type like the type of function `fn f<T>`, the type |
296 | // TODO fix documentation | 298 | /// parameters get turned into variables; during trait resolution, inference |
299 | /// variables get turned into bound variables and back; and in `Dyn` the | ||
300 | /// `Self` type is represented with a bound variable as well. | ||
297 | Bound(u32), | 301 | Bound(u32), |
298 | 302 | ||
299 | /// A type variable used during type checking. Not to be confused with a | 303 | /// A type variable used during type checking. |
300 | /// type parameter. | ||
301 | Infer(InferTy), | 304 | Infer(InferTy), |
302 | 305 | ||
303 | /// A trait object (`dyn Trait` or bare `Trait` in pre-2018 Rust). | 306 | /// A trait object (`dyn Trait` or bare `Trait` in pre-2018 Rust). |