Skip to content

Commit fb9ca16

Browse files
committed
Remove all instances of fragment_infos and fragment sets
1 parent 5b13bff commit fb9ca16

File tree

5 files changed

+1
-608
lines changed

5 files changed

+1
-608
lines changed

src/librustc/ty/context.rs

+1-29
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use ty::layout::{Layout, TargetDataLayout};
4040
use ty::inhabitedness::DefIdForest;
4141
use ty::maps;
4242
use ty::steal::Steal;
43-
use util::nodemap::{NodeMap, NodeSet, DefIdMap, DefIdSet};
43+
use util::nodemap::{NodeMap, NodeSet, DefIdSet};
4444
use util::nodemap::{FxHashMap, FxHashSet};
4545
use rustc_data_structures::accumulate_vec::AccumulateVec;
4646

@@ -499,33 +499,6 @@ pub struct GlobalCtxt<'tcx> {
499499
/// Maps Expr NodeId's to `true` iff `&expr` can have 'static lifetime.
500500
pub rvalue_promotable_to_static: RefCell<NodeMap<bool>>,
501501

502-
/// Maps Fn items to a collection of fragment infos.
503-
///
504-
/// The main goal is to identify data (each of which may be moved
505-
/// or assigned) whose subparts are not moved nor assigned
506-
/// (i.e. their state is *unfragmented*) and corresponding ast
507-
/// nodes where the path to that data is moved or assigned.
508-
///
509-
/// In the long term, unfragmented values will have their
510-
/// destructor entirely driven by a single stack-local drop-flag,
511-
/// and their parents, the collections of the unfragmented values
512-
/// (or more simply, "fragmented values"), are mapped to the
513-
/// corresponding collections of stack-local drop-flags.
514-
///
515-
/// (However, in the short term that is not the case; e.g. some
516-
/// unfragmented paths still need to be zeroed, namely when they
517-
/// reference parent data from an outer scope that was not
518-
/// entirely moved, and therefore that needs to be zeroed so that
519-
/// we do not get double-drop when we hit the end of the parent
520-
/// scope.)
521-
///
522-
/// Also: currently the table solely holds keys for node-ids of
523-
/// unfragmented values (see `FragmentInfo` enum definition), but
524-
/// longer-term we will need to also store mappings from
525-
/// fragmented data to the set of unfragmented pieces that
526-
/// constitute it.
527-
pub fragment_infos: RefCell<DefIdMap<Vec<ty::FragmentInfo>>>,
528-
529502
/// The definite name of the current crate after taking into account
530503
/// attributes, commandline parameters, etc.
531504
pub crate_name: Symbol,
@@ -730,7 +703,6 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
730703
selection_cache: traits::SelectionCache::new(),
731704
evaluation_cache: traits::EvaluationCache::new(),
732705
rvalue_promotable_to_static: RefCell::new(NodeMap()),
733-
fragment_infos: RefCell::new(DefIdMap()),
734706
crate_name: Symbol::intern(crate_name),
735707
data_layout: data_layout,
736708
layout_cache: RefCell::new(FxHashMap()),

src/librustc/ty/mod.rs

-11
Original file line numberDiff line numberDiff line change
@@ -443,17 +443,6 @@ pub struct CReaderCacheKey {
443443
pub pos: usize,
444444
}
445445

446-
/// Describes the fragment-state associated with a NodeId.
447-
///
448-
/// Currently only unfragmented paths have entries in the table,
449-
/// but longer-term this enum is expected to expand to also
450-
/// include data for fragmented paths.
451-
#[derive(Copy, Clone, Debug)]
452-
pub enum FragmentInfo {
453-
Moved { var: NodeId, move_expr: NodeId },
454-
Assigned { var: NodeId, assign_expr: NodeId, assignee_id: NodeId },
455-
}
456-
457446
// Flags that we track on types. These flags are propagated upwards
458447
// through the type during type construction, so that we can quickly
459448
// check whether the type has various kinds of types in it without

0 commit comments

Comments
 (0)