Skip to content

Commit 8830f8e

Browse files
committed
Remove box syntax from rustc_parse
1 parent 823e6f1 commit 8830f8e

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

compiler/rustc_parse/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#![feature(array_windows)]
44
#![feature(crate_visibility_modifier)]
55
#![cfg_attr(bootstrap, feature(bindings_after_at))]
6-
#![feature(box_syntax)]
76
#![feature(box_patterns)]
87
#![recursion_limit = "256"]
98

compiler/rustc_parse/src/parser/item.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ impl<'a> Parser<'a> {
221221
} else if self.check_fn_front_matter(def_final) {
222222
// FUNCTION ITEM
223223
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))))
225225
} else if self.eat_keyword(kw::Extern) {
226226
if self.eat_keyword(kw::Crate) {
227227
// EXTERN CRATE
@@ -548,7 +548,7 @@ impl<'a> Parser<'a> {
548548
};
549549
let trait_ref = TraitRef { path, ref_id: ty_first.id };
550550

551-
ItemKind::Impl(box ImplKind {
551+
ItemKind::Impl(Box::new(ImplKind {
552552
unsafety,
553553
polarity,
554554
defaultness,
@@ -557,11 +557,11 @@ impl<'a> Parser<'a> {
557557
of_trait: Some(trait_ref),
558558
self_ty: ty_second,
559559
items: impl_items,
560-
})
560+
}))
561561
}
562562
None => {
563563
// impl Type
564-
ItemKind::Impl(box ImplKind {
564+
ItemKind::Impl(Box::new(ImplKind {
565565
unsafety,
566566
polarity,
567567
defaultness,
@@ -570,7 +570,7 @@ impl<'a> Parser<'a> {
570570
of_trait: None,
571571
self_ty: ty_first,
572572
items: impl_items,
573-
})
573+
}))
574574
}
575575
};
576576

@@ -710,7 +710,7 @@ impl<'a> Parser<'a> {
710710
// It's a normal trait.
711711
tps.where_clause = self.parse_where_clause()?;
712712
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)))))
714714
}
715715
}
716716

@@ -769,7 +769,7 @@ impl<'a> Parser<'a> {
769769
let default = if self.eat(&token::Eq) { Some(self.parse_ty()?) } else { None };
770770
self.expect_semi()?;
771771

772-
Ok((ident, ItemKind::TyAlias(box TyAliasKind(def, generics, bounds, default))))
772+
Ok((ident, ItemKind::TyAlias(Box::new(TyAliasKind(def, generics, bounds, default)))))
773773
}
774774

775775
/// Parses a `UseTree`.

0 commit comments

Comments
 (0)