Skip to content

Implement FixedSizeEncoding for UnusedGenericParams. - #109324

Merged
bors merged 1 commit into
rust-lang:masterfrom
cjgillot:fixed-unused-params
Mar 19, 2023
Merged

Implement FixedSizeEncoding for UnusedGenericParams.#109324
bors merged 1 commit into
rust-lang:masterfrom
cjgillot:fixed-unused-params

Conversation

@cjgillot

Copy link
Copy Markdown
Contributor

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

@rustbot

Copy link
Copy Markdown
Collaborator

r? @oli-obk

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

@rustbotrustbot 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

@NoratriebNoratrieb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

r? Nilstrieb
r=me

@rustbotrustbot assigned Noratrieb and unassigned oli-obkMar 18, 2023
@Noratrieb

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Mar 18, 2023

Copy link
Copy Markdown
Collaborator

📌 Commit 38be6f2 has been approved by Nilstrieb

It is now in the queue for this repository.

@borsbors 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
Copy Markdown
Contributor

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?

@NoratriebNoratriebMar 19, 2023

Copy link
Copy Markdown
Member

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:masterMar 19, 2023
@rustbotrustbot added this to the 1.70.0 milestone Mar 19, 2023
@cjgillot
cjgillot deleted the fixed-unused-params branch March 23, 2023 19:03
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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

@cjgillot@rustbot@Noratrieb@bors@compiler-errors@oli-obk