@@ -1084,24 +1084,40 @@ pub struct BareFnTy {
1084
1084
}
1085
1085
1086
1086
#[ deriving( Clone , PartialEq , Eq , Encodable , Decodable , Hash , Show ) ]
1087
+ /// The different kinds of types recognized by the compiler
1087
1088
pub enum Ty_ {
1089
+ /// The unit type (`()`)
1088
1090
TyNil ,
1089
- TyBot , /* bottom type */
1091
+ /// The bottom type (`!`)
1092
+ TyBot ,
1090
1093
TyUniq ( P < Ty > ) ,
1094
+ /// An array (`[T]`)
1091
1095
TyVec ( P < Ty > ) ,
1096
+ /// A fixed length array (`[T, ..n]`)
1092
1097
TyFixedLengthVec ( P < Ty > , P < Expr > ) ,
1098
+ /// A raw pointer (`*const T` or `*mut T`)
1093
1099
TyPtr ( MutTy ) ,
1100
+ /// A reference (`&'a T` or `&'a mut T`)
1094
1101
TyRptr ( Option < Lifetime > , MutTy ) ,
1102
+ /// A closure (e.g. `|uint| -> bool`)
1095
1103
TyClosure ( P < ClosureTy > ) ,
1104
+ /// A procedure (e.g `proc(uint) -> bool`)
1096
1105
TyProc ( P < ClosureTy > ) ,
1106
+ /// A bare function (e.g. `fn(uint) -> bool`)
1097
1107
TyBareFn ( P < BareFnTy > ) ,
1108
+ /// A tuple (`(A, B, C, D,...)`)
1098
1109
TyTup ( Vec < P < Ty > > ) ,
1110
+ /// A path (`module::module::...::Type`) or primitive
1111
+ ///
1112
+ /// Type parameters are stored in the Path itself
1099
1113
TyPath ( Path , Option < TyParamBounds > , NodeId ) , // for #7264; see above
1100
- TyPolyTraitRef ( P < PolyTraitRef > ) , // a type like `for<'a> Foo<&'a Bar>`
1114
+ /// A type like `for<'a> Foo<&'a Bar>`
1115
+ TyPolyTraitRef ( P < PolyTraitRef > ) ,
1101
1116
/// A "qualified path", e.g. `<Vec<T> as SomeTrait>::SomeType`
1102
1117
TyQPath ( P < QPath > ) ,
1103
1118
/// No-op; kept solely so that we can pretty-print faithfully
1104
1119
TyParen ( P < Ty > ) ,
1120
+ /// Unused for now
1105
1121
TyTypeof ( P < Expr > ) ,
1106
1122
/// TyInfer means the type should be inferred instead of it having been
1107
1123
/// specified. This can appear anywhere in a type.
0 commit comments