@@ -222,30 +222,31 @@ impl<'a> LoweringContext<'a> {
222222 }
223223
224224 fn lower_ty ( & mut self , t : & Ty ) -> P < hir:: Ty > {
225- use syntax:: ast:: TyKind :: * ;
226225 P ( hir:: Ty {
227226 id : t. id ,
228227 node : match t. node {
229- Infer | ImplicitSelf => hir:: TyInfer ,
230- Vec ( ref ty) => hir:: TyVec ( self . lower_ty ( ty) ) ,
231- Ptr ( ref mt) => hir:: TyPtr ( self . lower_mt ( mt) ) ,
232- Rptr ( ref region, ref mt) => {
228+ TyKind :: Infer | TyKind :: ImplicitSelf => hir:: TyInfer ,
229+ TyKind :: Slice ( ref ty) => hir:: TySlice ( self . lower_ty ( ty) ) ,
230+ TyKind :: Ptr ( ref mt) => hir:: TyPtr ( self . lower_mt ( mt) ) ,
231+ TyKind :: Rptr ( ref region, ref mt) => {
233232 hir:: TyRptr ( self . lower_opt_lifetime ( region) , self . lower_mt ( mt) )
234233 }
235- BareFn ( ref f) => {
234+ TyKind :: BareFn ( ref f) => {
236235 hir:: TyBareFn ( P ( hir:: BareFnTy {
237236 lifetimes : self . lower_lifetime_defs ( & f. lifetimes ) ,
238237 unsafety : self . lower_unsafety ( f. unsafety ) ,
239238 abi : f. abi ,
240239 decl : self . lower_fn_decl ( & f. decl ) ,
241240 } ) )
242241 }
243- Never => hir:: TyNever ,
244- Tup ( ref tys) => hir:: TyTup ( tys. iter ( ) . map ( |ty| self . lower_ty ( ty) ) . collect ( ) ) ,
245- Paren ( ref ty) => {
242+ TyKind :: Never => hir:: TyNever ,
243+ TyKind :: Tup ( ref tys) => {
244+ hir:: TyTup ( tys. iter ( ) . map ( |ty| self . lower_ty ( ty) ) . collect ( ) )
245+ }
246+ TyKind :: Paren ( ref ty) => {
246247 return self . lower_ty ( ty) ;
247248 }
248- Path ( ref qself, ref path) => {
249+ TyKind :: Path ( ref qself, ref path) => {
249250 let qself = qself. as_ref ( ) . map ( |& QSelf { ref ty, position } | {
250251 hir:: QSelf {
251252 ty : self . lower_ty ( ty) ,
@@ -254,22 +255,22 @@ impl<'a> LoweringContext<'a> {
254255 } ) ;
255256 hir:: TyPath ( qself, self . lower_path ( path) )
256257 }
257- ObjectSum ( ref ty, ref bounds) => {
258+ TyKind :: ObjectSum ( ref ty, ref bounds) => {
258259 hir:: TyObjectSum ( self . lower_ty ( ty) , self . lower_bounds ( bounds) )
259260 }
260- FixedLengthVec ( ref ty, ref e) => {
261- hir:: TyFixedLengthVec ( self . lower_ty ( ty) , self . lower_expr ( e) )
261+ TyKind :: Array ( ref ty, ref e) => {
262+ hir:: TyArray ( self . lower_ty ( ty) , self . lower_expr ( e) )
262263 }
263- Typeof ( ref expr) => {
264+ TyKind :: Typeof ( ref expr) => {
264265 hir:: TyTypeof ( self . lower_expr ( expr) )
265266 }
266- PolyTraitRef ( ref bounds) => {
267+ TyKind :: PolyTraitRef ( ref bounds) => {
267268 hir:: TyPolyTraitRef ( self . lower_bounds ( bounds) )
268269 }
269- ImplTrait ( ref bounds) => {
270+ TyKind :: ImplTrait ( ref bounds) => {
270271 hir:: TyImplTrait ( self . lower_bounds ( bounds) )
271272 }
272- Mac ( _) => panic ! ( "TyMac should have been expanded by now." ) ,
273+ TyKind :: Mac ( _) => panic ! ( "TyMac should have been expanded by now." ) ,
273274 } ,
274275 span : t. span ,
275276 } )
@@ -891,8 +892,8 @@ impl<'a> LoweringContext<'a> {
891892 PatKind :: Range ( ref e1, ref e2) => {
892893 hir:: PatKind :: Range ( self . lower_expr ( e1) , self . lower_expr ( e2) )
893894 }
894- PatKind :: Vec ( ref before, ref slice, ref after) => {
895- hir:: PatKind :: Vec ( before. iter ( ) . map ( |x| self . lower_pat ( x) ) . collect ( ) ,
895+ PatKind :: Slice ( ref before, ref slice, ref after) => {
896+ hir:: PatKind :: Slice ( before. iter ( ) . map ( |x| self . lower_pat ( x) ) . collect ( ) ,
896897 slice. as_ref ( ) . map ( |x| self . lower_pat ( x) ) ,
897898 after. iter ( ) . map ( |x| self . lower_pat ( x) ) . collect ( ) )
898899 }
@@ -1031,7 +1032,7 @@ impl<'a> LoweringContext<'a> {
10311032 }
10321033
10331034 ExprKind :: Vec ( ref exprs) => {
1034- hir:: ExprVec ( exprs. iter ( ) . map ( |x| self . lower_expr ( x) ) . collect ( ) )
1035+ hir:: ExprArray ( exprs. iter ( ) . map ( |x| self . lower_expr ( x) ) . collect ( ) )
10351036 }
10361037 ExprKind :: Repeat ( ref expr, ref count) => {
10371038 let expr = self . lower_expr ( expr) ;
0 commit comments