summaryrefslogtreecommitdiffstats
path: root/vendor/camino/build.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
commit837b550238aa671a591ccf282dddeab29cadb206 (patch)
tree914b6b8862bace72bd3245ca184d374b08d8a672 /vendor/camino/build.rs
parentAdding debian version 1.70.0+dfsg2-1. (diff)
downloadrustc-837b550238aa671a591ccf282dddeab29cadb206.tar.xz
rustc-837b550238aa671a591ccf282dddeab29cadb206.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/camino/build.rs')
-rw-r--r--vendor/camino/build.rs11
1 files changed, 10 insertions, 1 deletions
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 {