Skip to content

Conversation

@andylokandy
Copy link
Collaborator

@andylokandy andylokandy commented Dec 11, 2025

Closes #17

@andylokandy andylokandy requested a review from Copilot December 11, 2025 16:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR attempts to fix the formatting of anonymous arguments in the logcall procedural macro, specifically addressing arguments generated by the async-trait crate. When async-trait transforms function signatures, it may rename underscore parameters (like _: String) to synthetic parameters starting with __arg. The change adds logic to skip these synthetic parameters when generating log format strings.

  • Adds a check to skip arguments whose identifiers start with __arg prefix
  • Converts identifier to string for prefix checking
  • Adds test cases for functions with underscore parameters

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/lib.rs Adds logic to skip async-trait generated parameters (those starting with "__arg") in the format string generation
tests/ui/ok/has-no-argument.rs Adds test case for function with underscore parameter fn g(_: i32)
tests/ui/ok/async-trait-underscore.rs Adds new test file for async-trait usage with underscore parameter in trait implementation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@andylokandy andylokandy changed the title fix: skip formating anonymous arguments fix: skip formatting anonymous arguments Dec 11, 2025
@andylokandy andylokandy merged commit 69a23e6 into fast:main Dec 11, 2025
5 checks passed
@andylokandy andylokandy deleted the dev branch December 11, 2025 16:13
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.

[Bug] async_trait underscore variable ignore cannot find value __arg1

1 participant