-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Update Arc docs to match new Rc docs #36665
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
src/liballoc/arc.rs
Outdated
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.
s/of/if/
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.
This still needs to be addressed.
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.
Fixed.
src/liballoc/arc.rs
Outdated
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.
Why removing these lines? We generally have an example at the module level as well. I don't mind changing it but I don't like it to get completely removed.
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.
It seems redundant. Isn't a link to the Arc
docs good enough? Besides, the module-level docs are only visible if you're looking at the alloc
crate directly and not std
.
Before r+, what do you think of this @steveklabnik? |
src/liballoc/arc.rs
Outdated
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.
So, it's true that duplication isn't great. Usually, module-level docs should have an overview of the whole module, but with modules like these, it's just a container for Arc/Weak, and nothing else. As such, I think I'm fine with removing this in this instance. Especially given the alloc/std
split as you mentioned.
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 so much for this! This PR is great, but I have a few nits.
src/liballoc/arc.rs
Outdated
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.
This still needs to be addressed.
src/liballoc/arc.rs
Outdated
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.
uuuuuuuuuuuugh these headings.
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... do you want me to leave it alone?
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.
src/liballoc/arc.rs
Outdated
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.
these links can be changed to drop the [clone]
...
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.
Is that so? I would have to change the link at the bottom to include the backticks, right? And that bugs me personally, although I agree it doesn't really matter.
src/liballoc/arc.rs
Outdated
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.
.. and then put
[`clone`]
here.
src/liballoc/arc.rs
Outdated
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.
"references" is the proper term.
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.
Fixed.
src/liballoc/arc.rs
Outdated
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'm a bit torn here. Showing the imports is a bit better, I think: it's less confusing for newer users, and makes it copy/paste able.
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 agree.
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.
Fixed.
I updated the PR. Let me know what you think, and if it's good, I will squash the |
☔ The latest upstream changes (presumably #36818) made this pull request unmergeable. Please resolve the merge conflicts. |
Rebased, and added one more link in |
@bors: r+ rollup Thanks for your patience here @kmcallister |
📌 Commit 29d3e57 has been approved by |
Thanks @steveklabnik! A lot of the delay was on my side, anyway. |
Update Arc docs to match new Rc docs `Rc` docs were updated in rust-lang#36571. This applies similar changes to `Arc` docs. r? @GuillaumeGomez
Rc
docs were updated in #36571. This applies similar changes toArc
docs.r? @GuillaumeGomez