Skip to content

Conversation

CAD97
Copy link
Contributor

@CAD97 CAD97 commented Jul 4, 2020

Specifically, this relaxes the bounds on rc::Weak::as_ptr, into_raw, and from_raw from impl<T> Weak<T> to impl<T: ?Sized> Weak<T>.

This is a follow-up to #73845, which did the impl work required to be able to relax these bounds.

IIUC, this technically stabilizes that "something like size_of_val_raw" is possible to do. However, I believe the part of the functionality required by these methods here -- specifically, getting the size of a pointee from a pointer where it may be dangling iff the pointee is Sized -- is uncontroversial enough to stabilize these methods without a way to implement them on stable Rust.

ATTN: This changes (relaxes) the (input) generic bounds on stable fn!

....to allow use with unsized T. This is a follow-up to rust-lang#73845,
which did the impl work required to be able to relax these bounds.
@rust-highfive
Copy link
Contributor

r? @sfackler

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 4, 2020
@CAD97
Copy link
Contributor Author

CAD97 commented Jul 4, 2020

...whoops, this apparently isn't quite possible yet. Closing for now.

@CAD97 CAD97 closed this Jul 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants