@@ -221,7 +221,7 @@ impl<'a> Parser<'a> {
221
221
} else if self . check_fn_front_matter ( def_final) {
222
222
// FUNCTION ITEM
223
223
let ( ident, sig, generics, body) = self . parse_fn ( attrs, req_name, lo) ?;
224
- ( ident, ItemKind :: Fn ( box FnKind ( def ( ) , sig, generics, body) ) )
224
+ ( ident, ItemKind :: Fn ( Box :: new ( FnKind ( def ( ) , sig, generics, body) ) ) )
225
225
} else if self . eat_keyword ( kw:: Extern ) {
226
226
if self . eat_keyword ( kw:: Crate ) {
227
227
// EXTERN CRATE
@@ -548,7 +548,7 @@ impl<'a> Parser<'a> {
548
548
} ;
549
549
let trait_ref = TraitRef { path, ref_id : ty_first. id } ;
550
550
551
- ItemKind :: Impl ( box ImplKind {
551
+ ItemKind :: Impl ( Box :: new ( ImplKind {
552
552
unsafety,
553
553
polarity,
554
554
defaultness,
@@ -557,11 +557,11 @@ impl<'a> Parser<'a> {
557
557
of_trait : Some ( trait_ref) ,
558
558
self_ty : ty_second,
559
559
items : impl_items,
560
- } )
560
+ } ) )
561
561
}
562
562
None => {
563
563
// impl Type
564
- ItemKind :: Impl ( box ImplKind {
564
+ ItemKind :: Impl ( Box :: new ( ImplKind {
565
565
unsafety,
566
566
polarity,
567
567
defaultness,
@@ -570,7 +570,7 @@ impl<'a> Parser<'a> {
570
570
of_trait : None ,
571
571
self_ty : ty_first,
572
572
items : impl_items,
573
- } )
573
+ } ) )
574
574
}
575
575
} ;
576
576
@@ -710,7 +710,7 @@ impl<'a> Parser<'a> {
710
710
// It's a normal trait.
711
711
tps. where_clause = self . parse_where_clause ( ) ?;
712
712
let items = self . parse_item_list ( attrs, |p| p. parse_trait_item ( ForceCollect :: No ) ) ?;
713
- Ok ( ( ident, ItemKind :: Trait ( box TraitKind ( is_auto, unsafety, tps, bounds, items) ) ) )
713
+ Ok ( ( ident, ItemKind :: Trait ( Box :: new ( TraitKind ( is_auto, unsafety, tps, bounds, items) ) ) ) )
714
714
}
715
715
}
716
716
@@ -769,7 +769,7 @@ impl<'a> Parser<'a> {
769
769
let default = if self . eat ( & token:: Eq ) { Some ( self . parse_ty ( ) ?) } else { None } ;
770
770
self . expect_semi ( ) ?;
771
771
772
- Ok ( ( ident, ItemKind :: TyAlias ( box TyAliasKind ( def, generics, bounds, default) ) ) )
772
+ Ok ( ( ident, ItemKind :: TyAlias ( Box :: new ( TyAliasKind ( def, generics, bounds, default) ) ) ) )
773
773
}
774
774
775
775
/// Parses a `UseTree`.
0 commit comments