Skip to content

Conversation

tvsfx
Copy link

@tvsfx tvsfx commented Aug 18, 2025

This PR is probably (?) too blunt an approach, but it does illustrate how one could go about fixing #6036.
Adds a test for illustration purposes.

@tvsfx
Copy link
Author

tvsfx commented Aug 19, 2025

Issue #3004 seems to be the only regression (surprisingly), but I'm not sure how my change caused this.

Mismatch at tests/source/macros.rs:1032:
 
 fn issue3004() {
     foo!(|_| { () });
-    stringify!((foo+));
+    stringify!(( foo+ ));
 }

EDIT: I misinterpreted the parse_item method's return value; I think the other parsers (for Ty and Pat) should be tried when it returns None, cause that means that the parsed argument starts with a token that's invalid for an Item. I pushed a commit that does this, and it should make tests pass.

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

Successfully merging this pull request may close these issues.

2 participants