From e3531667771e9459e10b7a055b64dbde72ca86e8 Mon Sep 17 00:00:00 2001 From: Icxolu <10486322+Icxolu@users.noreply.github.com> Date: Mon, 15 Jul 2024 21:00:54 +0200 Subject: [PATCH] only emit c-string literals on Rust 1.79 and later (#4352) (#4353) * only emit c-string literals on Rust 1.79 and later (#4352) * add newsfragment --- newsfragments/4353.fixed.md | 1 + pyo3-build-config/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 newsfragments/4353.fixed.md diff --git a/newsfragments/4353.fixed.md b/newsfragments/4353.fixed.md new file mode 100644 index 00000000000..73783479085 --- /dev/null +++ b/newsfragments/4353.fixed.md @@ -0,0 +1 @@ +fixed compile error due to c-string literals on Rust < 1.79 \ No newline at end of file diff --git a/pyo3-build-config/src/lib.rs b/pyo3-build-config/src/lib.rs index 2da3e56d3b6..0bc2274e0e5 100644 --- a/pyo3-build-config/src/lib.rs +++ b/pyo3-build-config/src/lib.rs @@ -143,7 +143,7 @@ pub fn print_feature_cfgs() { println!("cargo:rustc-cfg=invalid_from_utf8_lint"); } - if rustc_minor_version >= 77 { + if rustc_minor_version >= 79 { println!("cargo:rustc-cfg=c_str_lit"); }