From 321d1b1b694091f85d3f12071f6d435c59dc7f82 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 29 Jun 2023 11:51:46 -0700 Subject: [PATCH] Use `default-features = false` with bitflags. (#710) This disables `bitflags`' `std` feature, allowing it to work in no_std mode. --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 52d9e7c25..d52251ae6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ rust-version = "1.63" cc = { version = "1.0.68", optional = true } [dependencies] -bitflags = "2.3.3" +bitflags = { version = "2.3.3", default-features = false } itoa = { version = "1.0.1", default-features = false, optional = true } # Special dependencies used in rustc-dep-of-std mode. @@ -124,7 +124,7 @@ default = ["std", "use-libc-auxv"] # This enables use of std. Disabling this enables `#![no_std], and requires # Rust 1.64 or newer. -std = [] +std = ["bitflags/std"] # This is used in the port of std to rustix. rustc-dep-of-std = [