Skip to content

Conversation

@Veykril
Copy link
Member

@Veykril Veykril commented May 5, 2025

Closes #19371

Note that this is a fix within the proc-macro server, as such it requires an updated proc-macro server which is distributed via rustup

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 5, 2025
Comment on lines 240 to 276
expect![[r#"
SUBTREE $$ 1 1
SUBTREE $$ 1 1
LITERAL ByteStr byte_string 1
LITERAL Char c 1
LITERAL Str string 1
LITERAL CStr cstring 1
LITERAL Float 3.14f64 1
LITERAL Float -3.14f64 1
LITERAL Float 3.14 1
LITERAL Float -3.14 1
LITERAL Integer 123i64 1
LITERAL Integer 123 1"#]],
LITERAL Integer -123i64 1
LITERAL Integer 123 1
LITERAL Integer -123 1"#]],
expect![[r#"
SUBTREE $$ 42:[email protected]#ROOT2024 42:[email protected]#ROOT2024
SUBTREE $$ 42:[email protected]#ROOT2024 42:[email protected]#ROOT2024
LITERAL ByteStr byte_string 42:[email protected]#ROOT2024
LITERAL Char c 42:[email protected]#ROOT2024
LITERAL Str string 42:[email protected]#ROOT2024
LITERAL CStr cstring 42:[email protected]#ROOT2024
LITERAL Float 3.14f64 42:[email protected]#ROOT2024
LITERAL Float -3.14f64 42:[email protected]#ROOT2024
LITERAL Float 3.14 42:[email protected]#ROOT2024
LITERAL Float -3.14 42:[email protected]#ROOT2024
LITERAL Integer 123i64 42:[email protected]#ROOT2024
LITERAL Integer 123 42:[email protected]#ROOT2024"#]],
LITERAL Integer -123i64 42:[email protected]#ROOT2024
LITERAL Integer 123 42:[email protected]#ROOT2024
LITERAL Integer -123 42:[email protected]#ROOT2024"#]],
);
Copy link
Member Author

Choose a reason for hiding this comment

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

This output is bugged, the - is joined to the literal which is incorrect in our token tree model

@Veykril Veykril force-pushed the push-swvuyqwwplrt branch from 0eadd3b to 95fbe80 Compare May 5, 2025 11:57
@Veykril Veykril changed the title minor: Add more proc-macro tests for parsing negative literals fix: Fix proc-macro API creating malformed negative literals May 5, 2025
@Veykril Veykril enabled auto-merge May 5, 2025 11:58
@Veykril Veykril force-pushed the push-swvuyqwwplrt branch from 95fbe80 to 361a927 Compare May 5, 2025 12:10
@Veykril Veykril added this pull request to the merge queue May 5, 2025
Merged via the queue into rust-lang:master with commit aaefc26 May 5, 2025
14 checks passed
@Veykril Veykril deleted the push-swvuyqwwplrt branch May 5, 2025 12:32
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.

2 participants