Skip to content

Commit 8b53b5e

Browse files
committed
Enable the tokio unstable features
1 parent e5ebb84 commit 8b53b5e

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.cargo/config.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
[build]
2+
rustflags = ["--cfg", "tokio_unstable"]
3+
14
# On x86_64, we target the x86-64-v2 psABI, as it is a good compromise between
25
# modern CPU instructions and compatibility.
36
[target.x86_64-unknown-linux-gnu]
4-
rustflags = ["-C", "target-cpu=x86-64-v2"]
7+
rustflags = ["--cfg", "tokio_unstable", "-C", "target-cpu=x86-64-v2"]

.github/workflows/coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
run: |
117117
cargo test --no-fail-fast --workspace
118118
env:
119-
RUSTFLAGS: "-Cinstrument-coverage"
119+
RUSTFLAGS: "-Cinstrument-coverage --cfg tokio_unstable"
120120
LLVM_PROFILE_FILE: "cargo-test-%p-%m.profraw"
121121
DATABASE_URL: postgresql://postgres:postgres@localhost/postgres
122122
SQLX_OFFLINE: "1"

crates/cli/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
use vergen_gitcl::{Emitter, GitclBuilder, RustcBuilder};
77

88
fn main() -> anyhow::Result<()> {
9+
// Instruct rustc that we'll be using #[cfg(tokio_unstable)]
10+
println!("cargo::rustc-check-cfg=cfg(tokio_unstable)");
11+
912
// At build time, we override the version through the environment variable
1013
// VERGEN_GIT_DESCRIBE. In some contexts, it means this variable is set but
1114
// empty, so we unset it here.

0 commit comments

Comments
 (0)