diff options
| author | Boxy <rust@boxyuwu.dev> | 2025-08-22 12:31:34 +0100 | 
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2025-09-09 14:49:16 +0200 | 
| commit | 332d8d62356a1be77bfe6412ab5ed3fa33ae9af6 (patch) | |
| tree | 2126c8116ca7e3c3ae2eb529e045e76c16aaa736 /compiler/rustc_middle/src | |
| parent | e379c7758667f900aaf5551c4553c7d4c121e3e1 (diff) | |
| download | rust-332d8d62356a1be77bfe6412ab5ed3fa33ae9af6.tar.gz rust-332d8d62356a1be77bfe6412ab5ed3fa33ae9af6.zip | |
Driveby fixes
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/util.rs | 5 | 
1 files changed, 2 insertions, 3 deletions
| diff --git a/compiler/rustc_middle/src/ty/util.rs b/compiler/rustc_middle/src/ty/util.rs index 5a9e1918e4c..3b14e0256db 100644 --- a/compiler/rustc_middle/src/ty/util.rs +++ b/compiler/rustc_middle/src/ty/util.rs @@ -131,9 +131,8 @@ impl<'tcx> TyCtxt<'tcx> { /// Creates a hash of the type `Ty` which will be the same no matter what crate /// context it's calculated within. This is used by the `type_id` intrinsic. pub fn type_id_hash(self, ty: Ty<'tcx>) -> Hash128 { - // We want the type_id be independent of the types free regions, so we - // erase them. We also want type_id to be independnt of the names of bound - // regions so we anonymize them. + // We don't have region information, so we erase all free regions. Equal types + // must have the same `TypeId`, so we must anonymize all bound regions as well. let ty = self.erase_and_anonymize_regions(ty); self.with_stable_hashing_context(|mut hcx| { | 
