Depend on both crates individually

This commit is contained in:
Jonas Schievink 2021-08-31 13:10:16 +02:00
parent e6255356d2
commit 8969cbb22f
3 changed files with 7 additions and 5 deletions

4
Cargo.lock generated
View file

@ -52,9 +52,6 @@ name = "arbitrary"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "577b08a4acd7b99869f863c50011b01eb73424ccc798ecd996f2e24817adfca7"
dependencies = [
"derive_arbitrary",
]
[[package]]
name = "arrayvec"
@ -157,6 +154,7 @@ name = "cfg"
version = "0.0.0"
dependencies = [
"arbitrary",
"derive_arbitrary",
"expect-test",
"mbe",
"oorandom",

View file

@ -17,5 +17,9 @@ tt = { path = "../tt", version = "0.0.0" }
mbe = { path = "../mbe" }
syntax = { path = "../syntax" }
expect-test = "1.1"
arbitrary = { version = "1", features = ["derive"] }
oorandom = "11"
# We depend on both individually instead of using `features = ["derive"]` to microoptimize the
# build graph: if the feature was enabled, syn would be built early on in the graph if `smolstr`
# supports `arbitrary`. This way, we avoid feature unification.
arbitrary = "1"
derive_arbitrary = "1"

View file

@ -50,7 +50,7 @@ impl fmt::Display for CfgAtom {
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
#[cfg_attr(test, derive(arbitrary::Arbitrary))]
#[cfg_attr(test, derive(derive_arbitrary::Arbitrary))]
pub enum CfgExpr {
Invalid,
Atom(CfgAtom),