aboutsummaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-11-25 04:11:06 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-11-25 04:11:06 +0000
commit3319c5bfa9423706541c8b26df65a027eb475e93 (patch)
tree5f68104e9962a2fb34e1ce6de499f96278355ff1 /build.rs
parent063752fac875c4159e27796afd17ecc730255445 (diff)
parent8eecee95bb951055ece8f1e2df232a4b4b898fad (diff)
downloadasync-trait-3319c5bfa9423706541c8b26df65a027eb475e93.tar.gz
Change-Id: I234b9a69c51c8efa9d71a36d1daa29d8c2094ed6
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/build.rs b/build.rs
index d7f6b15..f25fb0a 100644
--- a/build.rs
+++ b/build.rs
@@ -3,7 +3,7 @@ use std::process::Command;
use std::str;
fn main() {
- println!("cargo:rerun-if-changed=build.rs");
+ println!("cargo:rerun-if-env-changed=DOCS_RS");
let compiler = match rustc_minor_version() {
Some(compiler) => compiler,
@@ -17,6 +17,10 @@ fn main() {
if compiler < 47 {
println!("cargo:rustc-cfg=self_span_hack");
}
+
+ if compiler >= 75 && env::var_os("DOCS_RS").is_none() {
+ println!("cargo:rustc-cfg=native_async_fn_in_trait");
+ }
}
fn rustc_minor_version() -> Option<u32> {