Delete support for compilers without PathBuf::into_boxed_path

This commit is contained in:
David Tolnay 2023-07-27 22:36:48 -07:00
parent c91737fef1
commit 89976c2712
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 1 additions and 7 deletions

View File

@ -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<Box<T>> for Rc<T> / Arc<T> stabilized in Rust 1.21:
// https://doc.rust-lang.org/std/rc/struct.Rc.html#impl-From<Box<T>>
// https://doc.rust-lang.org/std/sync/struct.Arc.html#impl-From<Box<T>>

View File

@ -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<Path>, PathBuf::into_boxed_path);
////////////////////////////////////////////////////////////////////////////////