This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Metadata V15: Expose pallet documentation #13452
Metadata V15: Expose pallet documentation #13452
Changes from 8 commits
521108e
6915a65
771bdd7
682adad
7e7661d
6d38dbb
7f32c9f
c5c894f
bb8cd03
bf9400b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Basti wrote
Personally, I don't understand that by the documentation in this PR. Can you elaborate a bit why both
doc
andpallet_doc
are needed in the examples or something.It could be just me though... :)
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.
Yep, that makes sense! I've improved the documentation a bit to clarify the attributes.
From a discussion with @bkchr it would be beneficial to have:
include_str!()
at the top of the file without having to duplicate the documentation itselfpallet_doc
attribute gives developers enough control until we can deduce the file from which a macro is invoked, and not the compile time location at which the macro is declared (Tracking issue forproc_macro::Span
inspection APIs rust-lang/rust#54725)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.
Here you mention that the docs are above the
module
and above the pallet attribute macro you are mentioning that the docs need to be above thestruct Pallet
,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.
Thanks for spotting this! I've picked the
pub mod pallet
to be consistent between documentations and pushed the commit here 🙏