diff --git a/serde/build.rs b/serde/build.rs index 7a5ce83a..da960fd8 100644 --- a/serde/build.rs +++ b/serde/build.rs @@ -16,12 +16,6 @@ fn main() { let target = env::var("TARGET").unwrap(); let emscripten = target == "asmjs-unknown-emscripten" || target == "wasm32-unknown-emscripten"; - // PathBuf::into_boxed_path stabilized in Rust 1.20: - // https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.into_boxed_path - if minor < 20 { - println!("cargo:rustc-cfg=no_de_boxed_path"); - } - // From> for Rc / Arc stabilized in Rust 1.21: // https://doc.rust-lang.org/std/rc/struct.Rc.html#impl-From> // https://doc.rust-lang.org/std/sync/struct.Arc.html#impl-From> diff --git a/serde/src/de/impls.rs b/serde/src/de/impls.rs index b362a216..959295d1 100644 --- a/serde/src/de/impls.rs +++ b/serde/src/de/impls.rs @@ -1710,7 +1710,7 @@ impl<'de> Deserialize<'de> for PathBuf { } } -#[cfg(all(feature = "std", not(no_de_boxed_path)))] +#[cfg(feature = "std")] forwarded_impl!((), Box, PathBuf::into_boxed_path); ////////////////////////////////////////////////////////////////////////////////