-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: Fix proc-macro API creating malformed negative literals #19746
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Veykril
commented
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"#]], | ||
); |
There was a problem hiding this comment.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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