Skip to content

use const initializer blocks for build-time & doc size metric buckets - #3534

Merged
syphar merged 1 commit into
rust-lang:mainfrom
syphar:const-gen
Sep 17, 2026
Merged

syphar merged 1 commit into
rust-lang:mainfrom
syphar:const-gen

Conversation

@syphar

@syphar syphar commented Sep 17, 2026

Copy link
Copy Markdown
Member

the comment by @GuillaumeGomez in #3533 made me think. Never used const initializer blocks, but this would work.

  • the doc-size buckets are the same before & after
  • the build-time buckets are slightly differnt, but I think in a good way.

Question for us is if that's better readable or not :) Let's discuss :)

If that's accepted I'll revisit the other histogram bucket definitions & metrics.

@syphar syphar self-assigned this Sep 17, 2026
@syphar
syphar requested a review from a team as a code owner September 17, 2026 13:52
@github-actions github-actions Bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Sep 17, 2026
@syphar

syphar commented Sep 17, 2026

Copy link
Copy Markdown
Member Author

r? @GuillaumeGomez

@rustbot rustbot assigned GuillaumeGomez and unassigned syphar Sep 17, 2026
@GuillaumeGomez

Copy link
Copy Markdown
Member

Readibility-wise, it's a bit less good, however the code comments explain what's going on and there is no typo issue possibility anymore (eventually logic ones). Nice work! I'll let it up to you whether you prefer this version or the previous one. In both cases you have my approval. :)

@syphar
syphar merged commit bfabfc0 into rust-lang:main Sep 17, 2026
12 checks passed
@syphar
syphar deleted the const-gen branch September 17, 2026 14:07
@github-actions github-actions Bot added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Sep 17, 2026
@syphar syphar removed the S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it label Sep 22, 2026

This branch was successfully deployed

1 active deployment
github-pages 2d71ea4c Deployed Sep 17, 2026 by syphar via deploy #391
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants