Update rustc-hash to version 2#17954
Conversation
|
oh lord, it looks like something relies on the iteration order or something like that :3. |
|
Yup, the iteration here calls a mutating callback and the state there seems to be iteration dependent (sorting the iterator by key causes the same issue on master) rust-analyzer/crates/hir-ty/src/lib.rs Line 249 in 1271dff |
|
The funny thing is, that test apparently should succeed given rustc is fine with it? pub enum TagTree {
Leaf,
Choice(&'static [TagTree]),
}
const GOAL: TagTree = {
const TAG_TREE: TagTree = TagTree::Choice(&[
{
const VARIANT_TAG_TREE: TagTree = TagTree::Choice(
&[
TagTree::Leaf,
],
);
VARIANT_TAG_TREE
},
]);
TAG_TREE
};
```
compiles just fine, yet the test errors on master |
|
Naively I'd say, lets replace the rust-analyzer/crates/hir-ty/src/lib.rs Line 199 in 191949e FxIndexMap and change the expected test output to success (if that change makes it succeed)
|
|
The test looks strange. I guess it meant to do recursive constants, something like this: pub enum TagTree {
Leaf,
Choice(&'static [TagTree]),
}
const GOAL: TagTree = {
const TAG_TREE: TagTree = TagTree::Choice(&[
{
const VARIANT_TAG_TREE: TagTree = TagTree::Choice(
&[
TAG_TREE,
],
);
VARIANT_TAG_TREE
},
]);
TAG_TREE
};The failure of the original test clearly is a bug. It should work with any order of execution, and sorting or using an stable iteration order does not fix the underlying problem. I would suggest changing the test to use an actual recursive constant like the code above, and opening an issue for that bug for further investigation. |
9059aff to
6a78851
Compare
|
@bors r+ |
Update rustc-hash to version 2 This brings in the new optimized algorithm that was shown to have small performance benefits for rustc. I haven't run the rust-analyzer benchmarks. See rust-lang/rustc-hash#37.
|
💔 Test failed - checks-actions |
|
☔ The latest upstream changes (presumably #18151) made this pull request unmergeable. Please resolve the merge conflicts. |
This brings in the new optimized algorithm that was shown to have small performance benefits for rustc.
9a94802 to
8be3b80
Compare
|
Okay let's see what breaks |
Update rustc-hash to version 2 This brings in the new optimized algorithm that was shown to have small performance benefits for rustc. I haven't run the rust-analyzer benchmarks. See rust-lang/rustc-hash#37.
|
💔 Test failed - checks-actions |
8be3b80 to
02e189d
Compare
|
@bors r+ |
|
☀️ Test successful - checks-actions |
|
nice! |
This brings in the new optimized algorithm that was shown to have small performance benefits for rustc. I haven't run the rust-analyzer benchmarks.
See rust-lang/rustc-hash#37.