From 36641ce8cde4b2a402cd50137521e8bb18476728 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Tue, 16 Oct 2018 17:21:55 +0200 Subject: [PATCH] Remove unused box --- src/librustc/middle/dead.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/librustc/middle/dead.rs b/src/librustc/middle/dead.rs index cd85d5e36144..dc5f73617250 100644 --- a/src/librustc/middle/dead.rs +++ b/src/librustc/middle/dead.rs @@ -50,8 +50,7 @@ struct MarkSymbolVisitor<'a, 'tcx: 'a> { worklist: Vec, tcx: TyCtxt<'a, 'tcx, 'tcx>, tables: &'a ty::TypeckTables<'tcx>, - // TODO: remove this `Box` - live_symbols: Box>, + live_symbols: FxHashSet, repr_has_repr_c: bool, in_pat: bool, inherited_pub_visibility: bool, @@ -424,13 +423,13 @@ fn create_and_seed_worklist<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, fn find_live<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, access_levels: &privacy::AccessLevels, krate: &hir::Crate) - -> Box> { + -> FxHashSet { let worklist = create_and_seed_worklist(tcx, access_levels, krate); let mut symbol_visitor = MarkSymbolVisitor { worklist, tcx, tables: &ty::TypeckTables::empty(None), - live_symbols: box Default::default(), + live_symbols: Default::default(), repr_has_repr_c: false, in_pat: false, inherited_pub_visibility: false, @@ -451,7 +450,7 @@ fn get_struct_ctor_id(item: &hir::Item) -> Option { struct DeadVisitor<'a, 'tcx: 'a> { tcx: TyCtxt<'a, 'tcx, 'tcx>, - live_symbols: Box>, + live_symbols: FxHashSet, } impl<'a, 'tcx> DeadVisitor<'a, 'tcx> {