Skip to content

perf: check names before context in the used-underscore lints#17408

Open
xmakro wants to merge 1 commit into
rust-lang:masterfrom
xmakro:split-underscore
Open

perf: check names before context in the used-underscore lints#17408
xmakro wants to merge 1 commit into
rust-lang:masterfrom
xmakro:split-underscore

Conversation

@xmakro

@xmakro xmakro commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

The shared context guard for used_underscore_binding and used_underscore_items (external-macro, desugaring, and automatically-derived checks) is expensive and ran on every expression, though the lints can only fire on names starting with a single underscore.

crate change
syn 2.0.71 -0.64%
serde 1.0.204 -0.79%
wasmi 0.35.0 -0.47%
regex 1.10.5 -0.34%
ryu 1.0.18 -1.38%

changelog: none

@xmakro
xmakro marked this pull request as ready for review July 12, 2026 03:30
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties S-waiting-on-community-reviews Status: This is awaiting for positive reviews from the community before a maintainer is assigned. labels Jul 12, 2026
@Jarcho

Jarcho commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

#17308 also does this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-community-reviews Status: This is awaiting for positive reviews from the community before a maintainer is assigned. 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