Skip to content

rc: Use ~T for allocation #8022

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
wants to merge 1 commit into from
Closed

rc: Use ~T for allocation #8022

wants to merge 1 commit into from

Conversation

bluss
Copy link
Member

@bluss bluss commented Jul 24, 2013

Simplify Rc/RcMut by using ~T when allocating a reference counted
box.

cc @thestinger

Simplify Rc<T>/RcMut<T> by using ~T when allocating a reference counted
box.
@bluss
Copy link
Member Author

bluss commented Jul 24, 2013

There is a new kind 'static that is used for @T now, and it's a supertrait of Send, can it be used by Rc/RcMut too?

@thestinger
Copy link
Contributor

@blake2-ppc: I'm not sure. Do you mean adding it as the type bound?

@bluss
Copy link
Member Author

bluss commented Jul 24, 2013

Using 'static it instead of <T: Send>, if it's possible.

@thestinger
Copy link
Contributor

Landing as part of #7982.

@thestinger thestinger closed this Jul 24, 2013
@thestinger
Copy link
Contributor

@blake2-ppc: I'm not sure if it would be enough, Send works for preventing cycles because Rc and RcMut are both non-Send, but I think they're 'static since they don't contain borrowed pointers.

@bluss
Copy link
Member Author

bluss commented Jul 24, 2013

Rc and RcMut are 'static. I think that using 'static and making Rc/RcMut non-static is a different tradeoff and probably not what's wanted.

@bluss bluss deleted the rc-owned branch July 24, 2013 18:09
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 this pull request may close these issues.

2 participants