-
Notifications
You must be signed in to change notification settings - Fork 456
rust: kernel: clean rustdoc
warnings
#412
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
Conversation
This comment has been minimized.
This comment has been minimized.
#410 introduces another one of these. |
Signed-off-by: Miguel Ojeda <[email protected]>
Review of
|
Thanks for the heads up -- merged #410 and fixed here. |
@@ -12,7 +12,7 @@ use core::{mem::ManuallyDrop, ops::Deref}; | |||
/// | |||
/// # Invariants | |||
/// | |||
/// The pointer [`File::ptr`] is non-null and valid. Its reference count is also non-zero. | |||
/// The pointer `File::ptr` is non-null and valid. Its reference count is also non-zero. |
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.
I think you can use File.ptr
as link.
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.
That works, but the link appears still as "[File.ptr
]" i.e. it is still broken because it points to a private field. :-(
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.
The other day we were discussing whether the invariants should be public or hide them, or whether we wanted to have private fields shown. Not sure what we will do.
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.
Of course. It is private. Maybe say "The inner pointer" as you can't see the ptr
field in the docs?
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.
Yeah, that is another option, definitely.
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.
Of course. It is private. Maybe say "The inner pointer" as you can't see the
ptr
field in the docs?
That is sort of I what I did for rbtrees: https://github.com/Rust-for-Linux/linux/pull/400/files#diff-0cb585b4b0d3d30535d603fd0ae07753fcd5a180b13d8f9f06164093c4551722R40
e.g. https://github.com/Rust-for-Linux/linux/pull/402/checks#step:60:27