Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add more explanation to local DefPathHash collision case.
  • Loading branch information
michaelwoerister committed Feb 4, 2021
1 parent d4d8bdf commit 97380e3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion compiler/rustc_hir/src/definitions.rs
Expand Up @@ -52,7 +52,14 @@ impl DefPathTable {

// Continuing with colliding DefPathHashes can lead to correctness
// issues. We must abort compilation.
panic!("Found DefPathHash collsion between {:?} and {:?}", def_path1, def_path2);
//
// The likelyhood of such a collision is very small, so actually
// running into one could be indicative of a poor hash function
// being used.
//
// See the documentation for DefPathHash for more information.
panic!("found DefPathHash collsion between {:?} and {:?}. \
Compilation cannot continue.", def_path1, def_path2);
}

// Assert that all DefPathHashes correctly contain the local crate's
Expand Down

0 comments on commit 97380e3

Please sign in to comment.