10000 `ItemTree`'s `ItemVisibilities` has no identity, so deduplicate by Veykril · Pull Request #19980 · rust-lang/rust-analyzer · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ItemTree's ItemVisibilities has no identity, so deduplicate #19980

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
Jun 12, 2025

Conversation

Veykril
Copy link
Member
@Veykril Veykril commented Jun 12, 2025

Likely not noticable, as barely anyone uses pub(in path) visibilities

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 12, 2025
@Veykril Veykril enabled auto-merge June 12, 2025 06:53
@Veykril Veykril disabled auto-merge June 12, 2025 06:54
@Veykril Veykril enabled auto-merge June 12, 2025 06:56
@Veykril Veykril force-pushed the push-qsuttvtvtytr branch from b684ba8 to 5996add Compare June 12, 2025 06:56
}
}
}

#[derive(Default, Debug, Eq, PartialEq)]
struct ItemVisibilities {
arena: Arena<RawVisibility>,
// `IndexSet`` is *big*, but we seldom have `in path` visibilities, so be lazy about it
set: Option<Box<IndexSet<RawVisibility>>>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should use FxIndexSet.

Copy link
Contributor

Choose a reason for hiding this comment

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

We probably need to add it to clippy's disallowed-types.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, can't we use IndexSet just during construction, then point them all to the same visibility in the Arena?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah right (why did my clippy not lint that 🤔)

Copy link
Member Author

Choose a reason for hiding this comment

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

We probably need to add it to clippy's disallowed-types.

Right that only lits the std types

@ChayimFriedman2 ChayimFriedman2 disabled auto-merge June 12, 2025 06:57
@Veykril Veykril force-pushed the push-qsuttvtvtytr branch 2 times, most recently from 088c65e to 319193f Compare June 12, 2025 07:07
@Veykril Veykril force-pushed the push-qsuttvtvtytr branch from 319193f to 13494f4 Compare June 12, 2025 07:15
@Veykril Veykril enabled auto-merge June 12, 2025 07:37
@Veykril Veykril requested a review from ChayimFriedman2 June 12, 2025 07:38
@Veykril Veykril added this pull request to the merge queue Jun 12, 2025
Merged via the queue into rust-lang:master with commit dc81984 Jun 12, 2025
14 checks passed
@Veykril Veykril deleted the push-qsuttvtvtytr branch June 12, 2025 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0