Skip to content

Commit a00aee1

Browse files
committed
Use a dedicated cfg for PathBuf::into_boxed_path
1 parent 4e31c99 commit a00aee1

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

serde/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ fn main() {
3434
// https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.into_boxed_path
3535
if minor >= 20 {
3636
println!("cargo:rustc-cfg=de_boxed_c_str");
37+
println!("cargo:rustc-cfg=de_boxed_path");
3738
}
3839

3940
// From<Box<T>> for Rc<T> / Arc<T> stabilized in Rust 1.21:

serde/src/de/impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,7 @@ impl<'de> Deserialize<'de> for PathBuf {
16101610
}
16111611
}
16121612

1613-
#[cfg(all(feature = "std", de_boxed_c_str))]
1613+
#[cfg(all(feature = "std", de_boxed_path))]
16141614
forwarded_impl!((), Box<Path>, PathBuf::into_boxed_path);
16151615

16161616
////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)