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

Add missing docs for the vm module #1021

Merged
merged 3 commits into from
Nov 14, 2023
Merged

Conversation

qinsoon
Copy link
Member

@qinsoon qinsoon commented Nov 11, 2023

This PR is a step towards #309.

Please feel free to make edits to the PR if there is any issue.

@qinsoon qinsoon requested a review from wks November 13, 2023 12:09
pub struct $spec_name(MetadataSpec);
impl $spec_name {
#[doc="The number of bits (in log2) that are needed for the spec."]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since /// xxxx is a syntax sugar for #[doc="xxxx"] at the language level, we can simply use /// in macro expansion, too. You can verify whether it produces documentation by executing cargo doc.

See: https://doc.rust-lang.org/reference/comments.html#doc-comments

Suggested change
#[doc="The number of bits (in log2) that are needed for the spec."]
/// The number of bits (in log2) that are needed for the spec.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. It works fine. I have changed most #[doc] to ///.

src/vm/scanning.rs Outdated Show resolved Hide resolved
src/vm/mod.rs Outdated Show resolved Hide resolved
src/vm/object_model.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@wks wks left a comment

Choose a reason for hiding this comment

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

LGTM

@qinsoon qinsoon added this pull request to the merge queue Nov 14, 2023
Merged via the queue into mmtk:master with commit 2d5bae7 Nov 14, 2023
19 checks passed
@qinsoon qinsoon deleted the missing-docs-vm branch November 14, 2023 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants