diff options
Diffstat (limited to '')
-rw-r--r-- | third_party/rust/serde/build.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/third_party/rust/serde/build.rs b/third_party/rust/serde/build.rs index fe5486a7a5..0074df63f4 100644 --- a/third_party/rust/serde/build.rs +++ b/third_party/rust/serde/build.rs @@ -64,6 +64,12 @@ fn main() { if minor < 64 { println!("cargo:rustc-cfg=no_core_cstr"); } + + // Support for core::num::Saturating and std::num::Saturating stabilized in Rust 1.74 + // https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html#stabilized-apis + if minor < 74 { + println!("cargo:rustc-cfg=no_core_num_saturating"); + } } fn rustc_minor_version() -> Option<u32> { |