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

Arc::make_unique ignores weak references #14521

Closed
aturon opened this issue May 29, 2014 · 0 comments
Closed

Arc::make_unique ignores weak references #14521

aturon opened this issue May 29, 2014 · 0 comments

Comments

@aturon
Copy link
Member

aturon commented May 29, 2014

The make_unique method for Arcs only ensures a unique strong reference. It needs to check the weak reference count as well.

bors added a commit that referenced this issue May 30, 2014
…ichton,me

This patch makes `Arc::make_unique` examine the number of weak
references as well as strong references, which is required for safety.

It also adds a `make_unique` method to the `Rc` type for consistency.

Closes #14521.
@aturon aturon closed this as completed in 7889c95 May 30, 2014
bors added a commit to rust-lang-ci/rust that referenced this issue Jun 5, 2023
Add bounds for fields in derive macro

Dependency of rust-lang#14470
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 a pull request may close this issue.

1 participant