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

Stabilize impls for dynamically sized Rc / Arc #1266

Closed
dtolnay opened this issue May 19, 2018 · 0 comments
Closed

Stabilize impls for dynamically sized Rc / Arc #1266

dtolnay opened this issue May 19, 2018 · 0 comments

Comments

@dtolnay
Copy link
Member

dtolnay commented May 19, 2018

Currently with --features rc we provide:

impl<'de, T> Deserialize<'de> for Rc<T> where T: Deserialize<'de>;
impl<'de, T> Deserialize<'de> for Arc<T> where T: Deserialize<'de>;

and with --features unstable,rc:

impl<'de, T> Deserialize<'de> for Rc<T> where T: ?Sized, Box<T>: Deserialize<'de>;
impl<'de, T> Deserialize<'de> for Arc<T> where T: ?Sized, Box<T>: Deserialize<'de>;

The more flexible impls were set as unstable because they rely on From<Box<T>> for Rc<T> / Arc<T> -- rust-lang/rust#40475. This conversion was stabilized in Rust 1.21 so we should be able to use version detection through the Serde build.rs script to automatically provide the more flexible impls on sufficiently new compilers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant