Repository: gfx-rs/wgpu (language: rust)

Issue:
Naga tests don't build without features
#6938 (use hashbrown in more crates) causes `cargo nextest run` in the `naga` subdirectory to fail:

```
cargo nextest run
   Compiling naga v24.0.0 (/home/jimb/wgpu/naga)
error[E0277]: the trait bound `hashbrown::set::HashSet<spirv::Capability, BuildHasherDefault<rustc_hash::FxHasher>>: Deserialize<'_>` is not satisfied
    --> naga/tests/snapshots.rs:45:19
     |
45   |     capabilities: naga::FastHashSet<spirv::Capability>,
     |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `hashbrown::set::HashSet<spirv::Capability, BuildHasherDefault<rustc_hash::FxHasher>>`
     |
```

I think the issue here is that serde itself implements `Deserialize` for `std::hash::HashSet`, but not `hashbrown::HashSet`.

Apparently CI doesn't run Naga tests without features.




Discussion / hints:

Fix patch:
diff --git a/naga/Cargo.toml b/naga/Cargo.toml
index d325866400..9cd92d1318 100644
--- a/naga/Cargo.toml
+++ b/naga/Cargo.toml
@@ -105,11 +105,12 @@ cfg_aliases.workspace = true
 [dev-dependencies]
 diff = "0.1"
 env_logger.workspace = true
-itertools.workspace = true
+hashbrown = { workspace = true, features = ["serde"] }
 # This _cannot_ have a version specified. If it does, crates.io will look
 # for a version of the package on crates when we publish naga. Path dependencies
 # are allowed through though.
 hlsl-snapshots = { path = "./hlsl-snapshots" }
+itertools.workspace = true
 # Require at least version 0.7.1 of ron, this version changed how floating points are
 # serialized by forcing them to always have the decimal part, this makes it backwards
 # incompatible with our tests because we do a syntactic diff and not a semantic one.


Test patch: