From 9835e2ae736235810b4ea1c162ca5e65c547e770 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 04:49:50 +0200 Subject: Merging upstream version 1.71.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/camino/build.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'vendor/camino/build.rs') diff --git a/vendor/camino/build.rs b/vendor/camino/build.rs index 7f5cbdf9b..c24fc8e61 100644 --- a/vendor/camino/build.rs +++ b/vendor/camino/build.rs @@ -24,13 +24,22 @@ fn main() { if compiler.minor >= 56 { println!("cargo:rustc-cfg=shrink_to"); } - // Stable and beta 1.63 have a stable try_reserve_2. + // NOTE: the below checks use == rather than `matches!`. This is because `matches!` isn't stable + // on Rust 1.34. + // try_reserve_2 was added in a 1.63 nightly. if (compiler.minor >= 63 && (compiler.channel == ReleaseChannel::Stable || compiler.channel == ReleaseChannel::Beta)) || compiler.minor >= 64 { println!("cargo:rustc-cfg=try_reserve_2"); } + // path_buf_deref_mut was added in a 1.68 nightly. + if (compiler.minor >= 68 + && (compiler.channel == ReleaseChannel::Stable || compiler.channel == ReleaseChannel::Beta)) + || compiler.minor >= 69 + { + println!("cargo:rustc-cfg=path_buf_deref_mut"); + } } struct Compiler { -- cgit v1.2.3