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