-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Use desc
as a doc-comment for queries if there are no doc comments
#80337
Conversation
r? @varkor (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
63a400f
to
10199c2
Compare
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.
It might be useful to display the output differently in these cases, to highlight that it's not a proper doc comment. Maybe in square brackets, or prefixed with "Short description:" or something like that? Is there a test we can add to ensure this continues working?
This comment has been minimized.
This comment has been minimized.
93af72f
to
9d9cd44
Compare
Thanks! Could you squash the commits? r=me after that. |
- Replace {} with the stringified expr Giant thank you to `@danielhenrymantilla` for figuring out how to make this work ❤️ - Note that this is just an approximation and it would be better to add a doc-comment
9d9cd44
to
e67f9d3
Compare
@bors r=varkor |
📌 Commit e67f9d3 has been approved by |
Rollup of 7 pull requests Successful merges: - rust-lang#80185 (Fix ICE when pointing at multi bytes character) - rust-lang#80260 (slightly more typed interface to panic implementation) - rust-lang#80311 (Improvements to NatVis support) - rust-lang#80337 (Use `desc` as a doc-comment for queries if there are no doc comments) - rust-lang#80381 (Revert "Cleanup markdown span handling") - rust-lang#80492 (remove empty wraps, don't return Results from from infallible functions) - rust-lang#80509 (where possible, pass slices instead of &Vec or &String (clippy::ptr_arg)) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This at least gives some idea of what the query does even if it's not very readable. Some examples:
I want to turn
{}
into either_
or the stringified expr, but I'm not sure how to do that. In the meantime, this is better than having no docs at all.