Skip to content

Commit 36641ce

Browse files
committed
Remove unused box
1 parent 5075174 commit 36641ce

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/librustc/middle/dead.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ struct MarkSymbolVisitor<'a, 'tcx: 'a> {
5050
worklist: Vec<ast::NodeId>,
5151
tcx: TyCtxt<'a, 'tcx, 'tcx>,
5252
tables: &'a ty::TypeckTables<'tcx>,
53-
// TODO: remove this `Box`
54-
live_symbols: Box<FxHashSet<ast::NodeId>>,
53+
live_symbols: FxHashSet<ast::NodeId>,
5554
repr_has_repr_c: bool,
5655
in_pat: bool,
5756
inherited_pub_visibility: bool,
@@ -424,13 +423,13 @@ fn create_and_seed_worklist<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
424423
fn find_live<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
425424
access_levels: &privacy::AccessLevels,
426425
krate: &hir::Crate)
427-
-> Box<FxHashSet<ast::NodeId>> {
426+
-> FxHashSet<ast::NodeId> {
428427
let worklist = create_and_seed_worklist(tcx, access_levels, krate);
429428
let mut symbol_visitor = MarkSymbolVisitor {
430429
worklist,
431430
tcx,
432431
tables: &ty::TypeckTables::empty(None),
433-
live_symbols: box Default::default(),
432+
live_symbols: Default::default(),
434433
repr_has_repr_c: false,
435434
in_pat: false,
436435
inherited_pub_visibility: false,
@@ -451,7 +450,7 @@ fn get_struct_ctor_id(item: &hir::Item) -> Option<ast::NodeId> {
451450

452451
struct DeadVisitor<'a, 'tcx: 'a> {
453452
tcx: TyCtxt<'a, 'tcx, 'tcx>,
454-
live_symbols: Box<FxHashSet<ast::NodeId>>,
453+
live_symbols: FxHashSet<ast::NodeId>,
455454
}
456455

457456
impl<'a, 'tcx> DeadVisitor<'a, 'tcx> {

0 commit comments

Comments
 (0)