Skip to content

Commit

Permalink
Auto merge of #119139 - michaelwoerister:cleanup-stable-source-file-i…
Browse files Browse the repository at this point in the history
…d, r=cjgillot

Unify SourceFile::name_hash and StableSourceFileId

This PR adapts the existing `StableSourceFileId` type so that it can be used instead of the `name_hash` field of `SourceFile`. This simplifies a few things that were kind of duplicated before.

The PR should also fix issues rust-lang/rust#112700 and rust-lang/rust#115835, but I was not able to reproduce these issues in a regression test. As far as I can tell, the root cause of these issues is that the id of the originating crate is not hashed in the `HashStable` impl of `Span` and thus cache entries that should have been considered invalidated were loaded. After this PR, the `stable_id` field of `SourceFile` includes information about the originating crate, so that ICE should not occur anymore.
  • Loading branch information
bors committed Dec 24, 2023
2 parents 241fab4 + 019fd29 commit 4b8d7fc
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 4b8d7fc

Please sign in to comment.