Skip to content

Stabilize impls for dynamically sized Rc / Arc #1266

@dtolnay

Description

@dtolnay

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions