-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
document which lifetime is needed for systemparam derive #11321
Conversation
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.
Great idea to document, but I think this will be a lot more robust as a doc test.
I agree, actual doc examples are more useful and less prone to desync. Also, the user can obtain the lifetime parameters from the specific |
Hope this is somewhat like you imagined? didn't want to make it visibly a codeblock, as there already is a example there. sadly no way to preserve table formatting during this... alas. |
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.
Looks good enough. Not comprehensive, but sufficiently covers the most important cases. Ultimately, lifetimes can still be seen on the struct docs of the specific SystemParam
.
yeah that they're available elsewhere is exactly ehy i didnt include all of them |
Objective
Document a few common cases of which lifetime is required when using SystemParam Derive
Solution
Added a table in the doc comment