Skip to content

Implement FixedSizeEncoding for UnusedGenericParams. #109324

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Mar 19, 2023

Conversation

cjgillot
Copy link
Contributor

Using a Lazy for actually a u32 value is 50% overhead, so let's encode the bitset directly.

@rustbot
Copy link
Collaborator

rustbot commented Mar 18, 2023

r? @oli-obk

(rustbot has picked a reviewer for you, use r? to override)

@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 Mar 18, 2023
Copy link
Member

@Noratrieb Noratrieb left a comment

Choose a reason for hiding this comment

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

r? Nilstrieb
r=me

@rustbot rustbot assigned Noratrieb and unassigned oli-obk Mar 18, 2023
@Noratrieb
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 18, 2023

📌 Commit 38be6f2 has been approved by Nilstrieb

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 Mar 18, 2023
.get(cdata, def_id.index)
.map_or_else(|| ty::UnusedGenericParams::new_all_used(), |lazy| lazy.decode((cdata, tcx)))
}
unused_generic_params => { cdata.root.tables.unused_generic_params.get(cdata, def_id.index) }
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
unused_generic_params => { cdata.root.tables.unused_generic_params.get(cdata, def_id.index) }
unused_generic_params => { table_direct }

I think?

Copy link
Member

@Noratrieb Noratrieb Mar 19, 2023

Choose a reason for hiding this comment

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

This would require impl ProcessQueryValue for UnusedGenericParams, which is 7 lines of trouble more than it's worth imo: master...Nilstrieb:tabled

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 19, 2023
Rollup of 10 pull requests

Successful merges:

 - rust-lang#104100 (Allow using `Range` as an `Iterator` in const contexts. )
 - rust-lang#105793 (Add note for mismatched types because of circular dependencies)
 - rust-lang#108798 (move default backtrace setting to sys)
 - rust-lang#108829 (Use Edition 2021 :pat in matches macro)
 - rust-lang#108973 (Beautify pin! docs)
 - rust-lang#109003 (Add `useless_anonymous_reexport` lint)
 - rust-lang#109022 (read_buf_exact: on error, all read bytes are appended to the buffer)
 - rust-lang#109212 (fix: don't suggest similar method when unstable)
 - rust-lang#109243 (The name of NativeLib will be presented)
 - rust-lang#109324 (Implement FixedSizeEncoding for UnusedGenericParams.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 881c989 into rust-lang:master Mar 19, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 19, 2023
@cjgillot cjgillot deleted the fixed-unused-params branch March 23, 2023 19:03
# for free to join this conversation on GitHub. Already have an account? # 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.

6 participants