Skip to content

Conversation

@llogiq
Copy link
Contributor

@llogiq llogiq commented Dec 24, 2025

I found that rustc-hash is used in multiple compiler crates. Also some types use FxBuildHasher whereas others use BuildHasherDefault<FxHasher> (both do the same thing).

In order to simplify future hashing experiments, I changed every location to use rustc_data_structures::fx::* types instead, and also removed the BuildHasherDefault variant. This will simplify future experiments with hashing (for example trying out a hasher that doesn't implement Default for whatever reason).

@rustbot
Copy link
Collaborator

rustbot commented Dec 24, 2025

Some changes occurred in exhaustiveness checking

cc @Nadrieril

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 24, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 24, 2025

r? @eholk

rustbot has assigned @eholk.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@llogiq llogiq force-pushed the rustc-hash-refactor branch from cc1e3be to 20c25b8 Compare January 4, 2026 11:37
@rustbot
Copy link
Collaborator

rustbot commented Jan 4, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-log-analyzer

This comment has been minimized.

@llogiq llogiq force-pushed the rustc-hash-refactor branch from 20c25b8 to 7939ffb Compare January 4, 2026 11:52
@llogiq
Copy link
Contributor Author

llogiq commented Jan 4, 2026

Ok, I removed the rustc_data_structures. dependency, leaving only the change of BuildHasherDefault<FxHasher> to FxBuildHasher (because that's one less type to import, and leaves us the option of changing the algorithm in the future to something that doesn't impl Default).

@rust-log-analyzer

This comment has been minimized.

@llogiq llogiq force-pushed the rustc-hash-refactor branch from 7939ffb to 9f5645d Compare January 4, 2026 13:18
@rust-log-analyzer

This comment has been minimized.

@llogiq llogiq force-pushed the rustc-hash-refactor branch from 9f5645d to 1229efb Compare January 4, 2026 14:26
@rust-log-analyzer

This comment has been minimized.

@llogiq llogiq force-pushed the rustc-hash-refactor branch from 1229efb to 6976fbc Compare January 4, 2026 15:46
@llogiq
Copy link
Contributor Author

llogiq commented Jan 4, 2026

Ok, this compiles now and passes all tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants