Skip to content

Commit

Permalink
add FIXME rust-lang#32753 markers: SVH vs ICH
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Apr 5, 2016
1 parent 6702e05 commit c7100b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/librustc_incremental/calculate_svh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ impl<'tcx> SvhCalculate for ty::TyCtxt<'tcx> {
let mut state = SipHasher::new();
debug!("state: {:?}", state);

// FIXME(#32753) -- at (*) we `to_le` for endianness, but is
// this enough, and does it matter anyway?
"crate_disambiguator".hash(&mut state);
crate_disambiguator.as_str().len().hash(&mut state);
crate_disambiguator.as_str().len().to_le().hash(&mut state); // (*)
crate_disambiguator.as_str().hash(&mut state);

debug!("crate_disambiguator: {:?}", crate_disambiguator.as_str());
Expand Down
1 change: 1 addition & 0 deletions src/librustc_incremental/persist/load.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ fn initial_dirty_nodes<'tcx>(tcx: &ty::TyCtxt<'tcx>,
for hashed_item in hashed_items {
match retraced.def_id(hashed_item.index) {
Some(def_id) => {
// FIXME(#32753) -- should we use a distinct hash here
let current_hash = tcx.calculate_item_hash(def_id);
debug!("initial_dirty_nodes: hash of {:?} is {:?}, was {:?}",
def_id, current_hash, hashed_item.hash);
Expand Down
1 change: 1 addition & 0 deletions src/librustc_incremental/persist/save.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ pub fn encode_dep_graph<'tcx>(tcx: &ty::TyCtxt<'tcx>,
assert!(def_id.is_local());
builder.add(def_id)
.map(|index| {
// FIXME(#32753) -- should we use a distinct hash here
let hash = tcx.calculate_item_hash(def_id);
SerializedHash { index: index, hash: hash }
})
Expand Down

0 comments on commit c7100b0

Please sign in to comment.