File tree 6 files changed +7
-7
lines changed
6 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -3705,7 +3705,7 @@ impl<'a> LoweringContext<'a> {
3705
3705
let ohs = P ( self . lower_expr ( ohs) ) ;
3706
3706
hir:: ExprKind :: Unary ( op, ohs)
3707
3707
}
3708
- ExprKind :: Lit ( ref l) => hir:: ExprKind :: Lit ( P ( ( * * l) . clone ( ) ) ) ,
3708
+ ExprKind :: Lit ( ref l) => hir:: ExprKind :: Lit ( P ( ( * l) . clone ( ) ) ) ,
3709
3709
ExprKind :: Cast ( ref expr, ref ty) => {
3710
3710
let expr = P ( self . lower_expr ( expr) ) ;
3711
3711
hir:: ExprKind :: Cast ( expr, self . lower_ty ( ty, ImplTraitContext :: disallowed ( ) ) )
Original file line number Diff line number Diff line change @@ -1086,7 +1086,7 @@ pub enum ExprKind {
1086
1086
/// A unary operation (For example: `!x`, `*x`)
1087
1087
Unary ( UnOp , P < Expr > ) ,
1088
1088
/// A literal (For example: `1`, `"foo"`)
1089
- Lit ( P < Lit > ) ,
1089
+ Lit ( Lit ) ,
1090
1090
/// A cast (`foo as f64`)
1091
1091
Cast ( P < Expr > , P < Ty > ) ,
1092
1092
Type ( P < Expr > , P < Ty > ) ,
Original file line number Diff line number Diff line change @@ -491,7 +491,7 @@ impl DummyResult {
491
491
pub fn raw_expr ( sp : Span ) -> P < ast:: Expr > {
492
492
P ( ast:: Expr {
493
493
id : ast:: DUMMY_NODE_ID ,
494
- node : ast:: ExprKind :: Lit ( P ( source_map:: respan ( sp, ast:: LitKind :: Bool ( false ) ) ) ) ,
494
+ node : ast:: ExprKind :: Lit ( source_map:: respan ( sp, ast:: LitKind :: Bool ( false ) ) ) ,
495
495
span : sp,
496
496
attrs : ThinVec :: new ( ) ,
497
497
} )
Original file line number Diff line number Diff line change @@ -695,7 +695,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
695
695
}
696
696
697
697
fn expr_lit ( & self , sp : Span , lit : ast:: LitKind ) -> P < ast:: Expr > {
698
- self . expr ( sp, ast:: ExprKind :: Lit ( P ( respan ( sp, lit) ) ) )
698
+ self . expr ( sp, ast:: ExprKind :: Lit ( respan ( sp, lit) ) )
699
699
}
700
700
fn expr_usize ( & self , span : Span , i : usize ) -> P < ast:: Expr > {
701
701
self . expr_lit ( span, ast:: LitKind :: Int ( i as u128 ,
Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ pub mod rt {
274
274
// FIXME: This is wrong
275
275
P ( ast:: Expr {
276
276
id : ast:: DUMMY_NODE_ID ,
277
- node : ast:: ExprKind :: Lit ( P ( self . clone ( ) ) ) ,
277
+ node : ast:: ExprKind :: Lit ( self . clone ( ) ) ,
278
278
span : DUMMY_SP ,
279
279
attrs : ThinVec :: new ( ) ,
280
280
} ) . to_tokens ( cx)
@@ -305,7 +305,7 @@ pub mod rt {
305
305
let lit = ast:: LitKind :: Int ( val as u128 , ast:: LitIntType :: Signed ( $tag) ) ;
306
306
let lit = P ( ast:: Expr {
307
307
id: ast:: DUMMY_NODE_ID ,
308
- node: ast:: ExprKind :: Lit ( P ( dummy_spanned( lit) ) ) ,
308
+ node: ast:: ExprKind :: Lit ( dummy_spanned( lit) ) ,
309
309
span: DUMMY_SP ,
310
310
attrs: ThinVec :: new( ) ,
311
311
} ) ;
Original file line number Diff line number Diff line change @@ -1989,7 +1989,7 @@ impl<'a> Parser<'a> {
1989
1989
let minus_lo = self . span ;
1990
1990
let minus_present = self . eat ( & token:: BinOp ( token:: Minus ) ) ;
1991
1991
let lo = self . span ;
1992
- let literal = P ( self . parse_lit ( ) ?) ;
1992
+ let literal = self . parse_lit ( ) ?;
1993
1993
let hi = self . prev_span ;
1994
1994
let expr = self . mk_expr ( lo. to ( hi) , ExprKind :: Lit ( literal) , ThinVec :: new ( ) ) ;
1995
1995
You can’t perform that action at this time.
0 commit comments