Skip to content
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

display varargs in completion detail #19363

Merged
merged 1 commit into from
Mar 16, 2025
Merged

Conversation

euclio
Copy link
Contributor

@euclio euclio commented Mar 15, 2025

Currently the varargs are ignored, making the function signatures misleading.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 15, 2025
Comment on lines 330 to 331
params_display(ctx, func),
if func.is_varargs(ctx.db) { ", ..." } else { "" }
Copy link
Member

Choose a reason for hiding this comment

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

Let's add that change to params_display. Might even be better to change this to not have params_display allocate a separate string here in the first place, that is use format_to for params_display (instead of format!).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Passing a mutable string to params_display seemed a bit messy to me compared to the gains, so I left as-is.

Copy link
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

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

Thanks!

@Veykril Veykril added this pull request to the merge queue Mar 16, 2025
Merged via the queue into rust-lang:master with commit 8b5816b Mar 16, 2025
9 checks passed
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.

3 participants