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