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.
Currently with
--features rcwe provide:and with
--features unstable,rc: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.