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

Implement conversion from Box to Rc / Arc. #29953

Closed
Ms2ger opened this issue Nov 20, 2015 · 7 comments
Closed

Implement conversion from Box to Rc / Arc. #29953

Ms2ger opened this issue Nov 20, 2015 · 7 comments
Labels
T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@Ms2ger
Copy link
Contributor

Ms2ger commented Nov 20, 2015

Initially proposed in #29580.

@Ms2ger
Copy link
Contributor Author

Ms2ger commented Nov 20, 2015

Though the implementation there wasn't too interesting; it would be more useful to have an implementation that works on unsized types/

@apasel422
Copy link
Contributor

How would this work? The backing storage for Arc<T> and Rc<T> is two usizes bigger than that of Box<T>. Or would this not be a "free" conversion?

@Ms2ger
Copy link
Contributor Author

Ms2ger commented Nov 20, 2015

I guess it would need to reallocate, yes.

@alexcrichton
Copy link
Member

I think that this issue is more appropriate in rust-lang/rfcs (e.g. feature requests), could you move over there instead?

@steveklabnik steveklabnik added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed A-libs labels Mar 24, 2017
@Mark-Simulacrum
Copy link
Member

Closing in favor of #40475.

@snuk182
Copy link

snuk182 commented Jul 4, 2017

Doesn't #40475 cover the boxed arrays conversions only?

@Mark-Simulacrum
Copy link
Member

From the RFC: From<Box<T: ?Sized>> for Rc<T> is to be added. I think that covers it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants