@@ -91,7 +91,7 @@ fn const_vec(cx: &CrateContext, e: &ast::Expr,
91
91
let vec_ty = ty:: expr_ty ( cx. tcx ( ) , e) ;
92
92
let unit_ty = ty:: sequence_element_type ( cx. tcx ( ) , vec_ty) ;
93
93
let llunitty = type_of:: type_of ( cx, unit_ty) ;
94
- let vs = es. iter ( ) . map ( |e| const_expr ( cx, & * * e) . val0 ( ) )
94
+ let vs = es. iter ( ) . map ( |e| const_expr ( cx, & * * e) . 0 )
95
95
. collect :: < Vec < _ > > ( ) ;
96
96
// If the vector contains enums, an LLVM array won't work.
97
97
let v = if vs. iter ( ) . any ( |vi| val_ty ( * vi) != llunitty) {
@@ -302,7 +302,7 @@ pub fn const_expr<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, e: &ast::Expr)
302
302
// if it's assigned to a static.
303
303
fn const_expr_unadjusted ( cx : & CrateContext , e : & ast:: Expr ) -> ValueRef {
304
304
let map_list = |exprs : & [ P < ast:: Expr > ] | {
305
- exprs. iter ( ) . map ( |e| const_expr ( cx, & * * e) . val0 ( ) )
305
+ exprs. iter ( ) . map ( |e| const_expr ( cx, & * * e) . 0 )
306
306
. fold ( Vec :: new ( ) , |mut l, val| { l. push ( val) ; l } )
307
307
} ;
308
308
unsafe {
@@ -575,7 +575,7 @@ fn const_expr_unadjusted(cx: &CrateContext, e: &ast::Expr) -> ValueRef {
575
575
let cs = field_tys. iter ( ) . enumerate ( )
576
576
. map ( |( ix, & field_ty) | {
577
577
match fs. iter ( ) . find ( |f| field_ty. name == f. ident . node . name ) {
578
- Some ( ref f) => const_expr ( cx, & * f. expr ) . val0 ( ) ,
578
+ Some ( ref f) => const_expr ( cx, & * f. expr ) . 0 ,
579
579
None => {
580
580
match base_val {
581
581
Some ( ( bv, _) ) => {
@@ -594,7 +594,7 @@ fn const_expr_unadjusted(cx: &CrateContext, e: &ast::Expr) -> ValueRef {
594
594
} )
595
595
}
596
596
ast:: ExprVec ( ref es) => {
597
- const_vec ( cx, e, es. as_slice ( ) ) . val0 ( )
597
+ const_vec ( cx, e, es. as_slice ( ) ) . 0
598
598
}
599
599
ast:: ExprRepeat ( ref elem, ref count) => {
600
600
let vec_ty = ty:: expr_ty ( cx. tcx ( ) , e) ;
@@ -605,7 +605,7 @@ fn const_expr_unadjusted(cx: &CrateContext, e: &ast::Expr) -> ValueRef {
605
605
const_eval:: const_uint( i) => i as uint ,
606
606
_ => cx. sess ( ) . span_bug ( count. span , "count must be integral const expression." )
607
607
} ;
608
- let vs = Vec :: from_elem ( n, const_expr ( cx, & * * elem) . val0 ( ) ) ;
608
+ let vs = Vec :: from_elem ( n, const_expr ( cx, & * * elem) . 0 ) ;
609
609
if vs. iter ( ) . any ( |vi| val_ty ( * vi) != llunitty) {
610
610
C_struct ( cx, vs. as_slice ( ) , false )
611
611
} else {
@@ -673,10 +673,10 @@ fn const_expr_unadjusted(cx: &CrateContext, e: &ast::Expr) -> ValueRef {
673
673
_ => cx. sess ( ) . span_bug ( e. span , "expected a struct or variant def" )
674
674
}
675
675
}
676
- ast:: ExprParen ( ref e) => const_expr ( cx, & * * e) . val0 ( ) ,
676
+ ast:: ExprParen ( ref e) => const_expr ( cx, & * * e) . 0 ,
677
677
ast:: ExprBlock ( ref block) => {
678
678
match block. expr {
679
- Some ( ref expr) => const_expr ( cx, & * * expr) . val0 ( ) ,
679
+ Some ( ref expr) => const_expr ( cx, & * * expr) . 0 ,
680
680
None => C_nil ( cx)
681
681
}
682
682
}
0 commit comments