mirror of
https://gitee.com/openharmony/third_party_rust_serde
synced 2024-11-27 00:50:42 +00:00
Omit derive helpers in versions older than serde_derive msrv
This commit is contained in:
parent
74ca06662e
commit
b0cc213e57
@ -71,6 +71,11 @@ fn main() {
|
||||
println!("cargo:rustc-cfg=num_nonzero");
|
||||
}
|
||||
|
||||
// Current minimum supported version of serde_derive crate is Rust 1.31.
|
||||
if minor >= 31 {
|
||||
println!("cargo:rustc-cfg=serde_derive");
|
||||
}
|
||||
|
||||
// TryFrom, Atomic types, and non-zero signed integers stabilized in Rust 1.34:
|
||||
// https://blog.rust-lang.org/2019/04/11/Rust-1.34.0.html#tryfrom-and-tryinto
|
||||
// https://blog.rust-lang.org/2019/04/11/Rust-1.34.0.html#library-stabilizations
|
||||
|
@ -1,5 +1,8 @@
|
||||
#[cfg(serde_derive)]
|
||||
pub mod de;
|
||||
#[cfg(serde_derive)]
|
||||
pub mod ser;
|
||||
|
||||
pub mod size_hint;
|
||||
|
||||
// FIXME: #[cfg(doctest)] once https://github.com/rust-lang/rust/issues/67295 is fixed.
|
||||
|
Loading…
Reference in New Issue
Block a user