Use a dedicated cfg for PathBuf::into_boxed_path
This commit is contained in:
parent
4e31c9984d
commit
a00aee1495
@ -34,6 +34,7 @@ fn main() {
|
||||
// https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.into_boxed_path
|
||||
if minor >= 20 {
|
||||
println!("cargo:rustc-cfg=de_boxed_c_str");
|
||||
println!("cargo:rustc-cfg=de_boxed_path");
|
||||
}
|
||||
|
||||
// From<Box<T>> for Rc<T> / Arc<T> stabilized in Rust 1.21:
|
||||
|
@ -1610,7 +1610,7 @@ impl<'de> Deserialize<'de> for PathBuf {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "std", de_boxed_c_str))]
|
||||
#[cfg(all(feature = "std", de_boxed_path))]
|
||||
forwarded_impl!((), Box<Path>, PathBuf::into_boxed_path);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user