summaryrefslogtreecommitdiffstats
path: root/vendor/camino/build.rs
diff options
context:
space:
mode:
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 {