Skip to content

Commit 50a40e1

Browse files
committed
add FIXME rust-lang#32753 markers: SVH vs ICH
1 parent a2e0cbc commit 50a40e1

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/librustc_incremental/calculate_svh.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ impl<'tcx> SvhCalculate for ty::TyCtxt<'tcx> {
4444
let mut state = SipHasher::new();
4545
debug!("state: {:?}", state);
4646

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

5153
debug!("crate_disambiguator: {:?}", crate_disambiguator.as_str());

src/librustc_incremental/persist/load.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ fn initial_dirty_nodes<'tcx>(tcx: &ty::TyCtxt<'tcx>,
151151
for hashed_item in hashed_items {
152152
match retraced.def_id(hashed_item.index) {
153153
Some(def_id) => {
154+
// FIXME(#32753) -- should we use a distinct hash here
154155
let current_hash = tcx.calculate_item_hash(def_id);
155156
debug!("initial_dirty_nodes: hash of {:?} is {:?}, was {:?}",
156157
def_id, current_hash, hashed_item.hash);

src/librustc_incremental/persist/save.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ pub fn encode_dep_graph<'tcx>(tcx: &ty::TyCtxt<'tcx>,
9393
assert!(def_id.is_local());
9494
builder.add(def_id)
9595
.map(|index| {
96+
// FIXME(#32753) -- should we use a distinct hash here
9697
let hash = tcx.calculate_item_hash(def_id);
9798
SerializedHash { index: index, hash: hash }
9899
})

0 commit comments

Comments
 (0)