From 7b14f181b21b37eb89d8d4f1228606a7c0476e87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= <121866228+aborgna-q@users.noreply.github.com> Date: Thu, 25 Jul 2024 14:05:57 +0100 Subject: [PATCH] chore: Replace build.rs with lint config in Cargo.toml (#509) Rust 1.80 [just dropped](https://blog.rust-lang.org/2024/07/25/Rust-1.80.0.html), adding a lint option that allows us to avoid the `build.rs` definition added in https://github.com/CQCL/tket2/pull/386. (The nightly lint got updated before hitting beta, so there shouldn't be compatibility problems there). --- Cargo.toml | 1 + tket2/build.rs | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 tket2/build.rs diff --git a/Cargo.toml b/Cargo.toml index 93d7c29e..225c434d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,6 +20,7 @@ repository = "https://github.com/CQCL/tket2" license = "Apache-2.0" [workspace.lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ci_run)'] } missing_docs = "warn" [workspace.dependencies] diff --git a/tket2/build.rs b/tket2/build.rs deleted file mode 100644 index f87983e4..00000000 --- a/tket2/build.rs +++ /dev/null @@ -1,7 +0,0 @@ -//! Build script for the `tket2` crate. - -fn main() { - // We use a `ci_run` RUSTFLAG to indicate that we are running a CI check, - // so we can reject debug code using some tools defined in `utils.rs`. - println!("cargo:rustc-check-cfg=cfg(ci_run)"); -}