Skip to content

Add _value API for number literals in proc-macro#154608

Open
GuillaumeGomez wants to merge 2 commits intorust-lang:mainfrom
GuillaumeGomez:number_value_proc-macro_API
Open

Add _value API for number literals in proc-macro#154608
GuillaumeGomez wants to merge 2 commits intorust-lang:mainfrom
GuillaumeGomez:number_value_proc-macro_API

Conversation

@GuillaumeGomez
Copy link
Copy Markdown
Member

@GuillaumeGomez GuillaumeGomez commented Mar 30, 2026

Part of #136652.

This PR adds the *_value for numbers (integers and floats). However, f16 and f128 are voluntarily left out as they're still unstable. Adding support for them is just a matter of uncommenting two lines, so should be fine.

Setting same reviewer as last time.

r? @Urgau

@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 30, 2026
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez force-pushed the number_value_proc-macro_API branch from ae03536 to 7cb03fd Compare March 31, 2026 09:53
@GuillaumeGomez
Copy link
Copy Markdown
Member Author

My favourite kind of failure: works locally but not in CI. T_T

Updated the value in the tests to see which one exactly is failing.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez force-pushed the number_value_proc-macro_API branch from 7cb03fd to c755b56 Compare March 31, 2026 13:14
@GuillaumeGomez
Copy link
Copy Markdown
Member Author

Bug comes from an issue with GCC proc-macro ABI. Ignoring this test on GCC backend for now.

@GuillaumeGomez
Copy link
Copy Markdown
Member Author

CI fixed. :)

@Urgau
Copy link
Copy Markdown
Member

Urgau commented Mar 31, 2026

A libs (or maybe even libs-api) reviewer seems more appropriate to review this PR.

r? Amanieu (since you reviewed #136355)

@rustbot rustbot assigned Amanieu and unassigned Urgau Mar 31, 2026
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. 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.

5 participants