From 247895452c087f2569b79b0a6859bc616da57a12 Mon Sep 17 00:00:00 2001 From: Avril Date: Wed, 8 May 2024 16:57:25 +0100 Subject: [PATCH] Added feature `no_unwind_protection` for tests. build.rs: Added `rustc-check-cfg` for cfg flag `nightly`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fortune for stackalloc's current commit: Half curse − 半凶 --- Cargo.toml | 3 +++ build.rs | 1 + 2 files changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 2a1462a..c967724 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,3 +19,6 @@ rustc_version = "0.2" [features] default = [] no_std = [] + +# for tests +no_unwind_protection = [] diff --git a/build.rs b/build.rs index 87254ce..5785197 100644 --- a/build.rs +++ b/build.rs @@ -25,6 +25,7 @@ fn build_tramp() fn main() { // Assert we haven't travelled back in time assert!(version().unwrap().major >= 1); + println!("cargo::rustc-check-cfg=cfg(nightly)"); // Set cfg flags depending on release channel match version_meta().unwrap().channel {