Skip to content

Implementation of From on Rc incorrectly refers to Arc #113131

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

Closed
claytonwramsey opened this issue Jun 28, 2023 · 2 comments · Fixed by #113253
Closed

Implementation of From on Rc incorrectly refers to Arc #113131

claytonwramsey opened this issue Jun 28, 2023 · 2 comments · Fixed by #113253
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@claytonwramsey
Copy link

Location

The documentation of impl From<CString> for Rc<CStr> writes the following:

Converts a CString into an Rc<CStr> by moving the CString data into a new Arc buffer.

Summary

A quick peek at the implementation of From<CString> for Rc<CStr shows that it uses an Rc as the backing allocation, not an Arc. My guess is that this documentation was copy-pasted from the implementation on Arc and never edited.

The correct revision (if I understand the implementation correctly) would be to substitute Arc for Rc in the documentation.

@claytonwramsey claytonwramsey added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Jun 28, 2023
@tgross35
Copy link
Contributor

A PR would be welcome if you're interested!

@chenyukang chenyukang added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Jul 1, 2023
@claytonwramsey
Copy link
Author

Sure. I’m on vacation right now, but will get on it when I get back :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants