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

Compiler: Common macros don't have docstrings #6541

Closed
integraledelebesgue opened this issue Oct 30, 2024 · 10 comments · Fixed by #6627
Closed

Compiler: Common macros don't have docstrings #6541

integraledelebesgue opened this issue Oct 30, 2024 · 10 comments · Fixed by #6627
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed

Comments

@integraledelebesgue
Copy link
Collaborator

Macros like panic!, assert! or assert_eq! don't have docstrings we could show in their hovers.

@integraledelebesgue integraledelebesgue converted this from a draft issue Oct 30, 2024
@integraledelebesgue integraledelebesgue added bug Something isn't working documentation Improvements or additions to documentation and removed bug Something isn't working labels Oct 30, 2024
@mkaput mkaput moved this from Triage to Backlog in CairoLS Oct 30, 2024
@poolcleaner6
Copy link

Could you clarify which specific traits should have the use statements added in the Quick Fix? I'm interested in understanding the scope of this fix

@integraledelebesgue
Copy link
Collaborator Author

Could you clarify which specific traits should have the use statements added in the Quick Fix? I'm interested in understanding the scope of this fix

I'm talking about hover displays that appear in the IDE.

print! macro has a nice docstring that we display when user points at it with their cursor:
obraz

On a contrary, panic!, assert_eq! and many others don't:
obraz

Those macros lack docstrings because their corresponding representations in compiler use default implementation of documentation method from this trait.
See print! implementation vs. panic! implementation

@Arcticae Arcticae added good first issue Good for newcomers help wanted Extra attention is needed labels Nov 4, 2024
@GradleD

This comment was marked as spam.

@Arcticae Arcticae removed this from CairoLS Nov 7, 2024
@ryzen-xp
Copy link

ryzen-xp commented Nov 8, 2024

Can I try solving this issue?

@mkaput
Copy link
Member

mkaput commented Nov 8, 2024

PRs welcome 😃

@nehkee
Copy link

nehkee commented Nov 8, 2024

Would love to tackle this!

@Another-DevX
Copy link

GM.
I'll work on this, maybe you can assign to me this issue?

@mkaput
Copy link
Member

mkaput commented Nov 13, 2024

@Another-DevX we're not assigning external contributors in this repo. Just submit PRs

@Another-DevX
Copy link

Got it!

@Krishn1412
Copy link

Could I try solving this?

@mkaput mkaput linked a pull request Nov 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants