Skip to content

Fix cloning from a BitSet with a different domain size #99052

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

Merged
merged 1 commit into from
Aug 1, 2022

Conversation

tmiasko
Copy link
Contributor

@tmiasko tmiasko commented Jul 8, 2022

The previous implementation incorrectly assumed that the
number of words in a bit set is equal to the domain size.

The new implementation delegates to Vec::clone_from which
is specialized for Copy elements.

Fixes #99006.

The previous implementation incorrectly assumed that the
number of words in a bit set is equal to the domain size.

The new implementation delegates to `Vec::clone_from` which
is specialized for `Copy` elements.
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 8, 2022
@rust-highfive
Copy link
Contributor

r? @estebank

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 8, 2022
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup=never

@bors
Copy link
Collaborator

bors commented Jul 31, 2022

📌 Commit 9139a63 has been approved by Mark-Simulacrum

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 Jul 31, 2022
@bors
Copy link
Collaborator

bors commented Jul 31, 2022

⌛ Testing commit 9139a63 with merge 34805f3...

@bors
Copy link
Collaborator

bors commented Aug 1, 2022

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 34805f3 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 1, 2022
@bors bors merged commit 34805f3 into rust-lang:master Aug 1, 2022
@rustbot rustbot added this to the 1.64.0 milestone Aug 1, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (34805f3): comparison url.

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

Results
  • Primary benchmarks: 🎉 relevant improvement found
  • Secondary benchmarks: no relevant changes found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
-2.1% -2.1% 1
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) -2.1% -2.1% 1

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. the arithmetic mean of the percent change

  2. number of relevant changes

@tmiasko tmiasko deleted the bitset-clone-from branch August 2, 2022 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

clone bug in rustc_index::bit_set::BitSet
7 participants