Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use FxHasher on new solver unconditionally #129526

Merged
merged 1 commit into from
Aug 26, 2024
Merged

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Aug 24, 2024

r? lqd

This should actually fix the inference problem in ad855fe, since HashSet::default was not inferring the hasher when HashSet was coming from the stdlib due to the way that defaulted types/inference vars work. You could cherry-pick this on top of your PR alternatively.

@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 Aug 24, 2024
@rustbot
Copy link
Collaborator

rustbot commented Aug 24, 2024

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.

@rust-log-analyzer

This comment has been minimized.

@lqd
Copy link
Member

lqd commented Aug 24, 2024

I didn't know if we could use fx by default there, but if you'd prefer this it's also fine by me of course. Landing it here or the other PR is also fine by me. Feel free to r- the other one if you'd prefer we cherry-pick this one.

(IndexSet is still used though, from the CI failure)

use rustc_hash::FxHasher;
pub use rustc_hash::{FxHashMap as HashMap, FxHashSet as HashSet};

pub type FxIndexMap<K, V> = indexmap::IndexMap<K, V, BuildHasherDefault<FxHasher>>;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

facepalm

@compiler-errors
Copy link
Member Author

Can land this after yours lands :)

@lqd
Copy link
Member

lqd commented Aug 25, 2024

Sounds good :)

#129523 is being tested atm so r=me whenever you need.

(I've added this commit in #129529 and removed the now unneeded explicit type there as well)

@lqd
Copy link
Member

lqd commented Aug 25, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Aug 25, 2024

📌 Commit 1c58522 has been approved by lqd

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 25, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 26, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#129288 (Use subtyping for `UnsafeFnPointer` coercion, too)
 - rust-lang#129405 (Fixing span manipulation and indentation of the suggestion introduced by rust-lang#126187)
 - rust-lang#129518 (gitignore: ignore ICE reports regardless of directory)
 - rust-lang#129519 (Remove redundant flags from `lower_ty_common` that can be inferred from the HIR)
 - rust-lang#129525 (rustdoc: clean up tuple <-> primitive conversion docs)
 - rust-lang#129526 (Use `FxHasher` on new solver unconditionally)
 - rust-lang#129544 (Removes dead code from the compiler)
 - rust-lang#129553 (add back test for stable-const-can-only-call-stable-const)
 - rust-lang#129590 (Avoid taking reference of &TyKind)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 26, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#129288 (Use subtyping for `UnsafeFnPointer` coercion, too)
 - rust-lang#129405 (Fixing span manipulation and indentation of the suggestion introduced by rust-lang#126187)
 - rust-lang#129518 (gitignore: ignore ICE reports regardless of directory)
 - rust-lang#129519 (Remove redundant flags from `lower_ty_common` that can be inferred from the HIR)
 - rust-lang#129525 (rustdoc: clean up tuple <-> primitive conversion docs)
 - rust-lang#129526 (Use `FxHasher` on new solver unconditionally)
 - rust-lang#129544 (Removes dead code from the compiler)
 - rust-lang#129553 (add back test for stable-const-can-only-call-stable-const)
 - rust-lang#129590 (Avoid taking reference of &TyKind)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a8a242c into rust-lang:master Aug 26, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 26, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 26, 2024
Rollup merge of rust-lang#129526 - compiler-errors:fx, r=lqd

Use `FxHasher` on new solver unconditionally

r? lqd

This should actually fix the inference problem in ad855fe, since `HashSet::default` was not inferring the hasher when `HashSet` was coming from the stdlib due to the way that defaulted types/inference vars work. You could cherry-pick this on top of your PR alternatively.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

5 participants