-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 docs for shared_from_slice From impls #82041
Conversation
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
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.
Nice, this is great.
Small nit: Can you put the doc comments above the #[inline]
attribute? We usually put the doc comment first and keep the attributes close to the function signature.
The advantage of making these docs is mostly in pointing out that these functions all make new allocations and copy/clone/move the source into them. These docs are on the function, and not the `impl` block, to avoid showing the "[+] show undocumented items" button. CC rust-lang#51430
cb23344
to
7fafa4d
Compare
Okay, the |
Thanks! @bors r+ rollup |
📌 Commit 7fafa4d has been approved by |
Rollup of 8 pull requests Successful merges: - rust-lang#81811 (Fix doc test for Vec::retain(), now passes clippy::eval_order_dependence) - rust-lang#81900 (Organize trait test files) - rust-lang#81995 (Fix suggestion to introduce explicit lifetime) - rust-lang#82031 (Drop an unnecessary intermediate variable) - rust-lang#82033 (Refactor `get_word_attr` to return only `Option`) - rust-lang#82040 (Add test to prevent src link regression) - rust-lang#82041 (Add docs for shared_from_slice From impls) - rust-lang#82050 (Added tests to drain an empty vec) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
The advantage of making these docs is mostly in pointing out that these
functions all make new allocations and copy/clone/move the source into them.
These docs are on the function, and not the
impl
block, to avoid showingthe "[+] show undocumented items" button.
CC #51430