bevy/crates/bevy_reflect/src
Gino Valente 227e1bbf34 bevy_reflect: Re-reflect hashbrown types (#18944)
# Objective

Fixes #18943

## Solution

Reintroduces support for `hashbrown`'s `HashMap` and `HashSet` types.
These were inadvertently removed when `bevy_platform` newtyped the
`hashbrown` types.

Since we removed our `hashbrown` dependency, I gated these impls behind
a `hashbrown` feature. Not entirely sure if this is necessary since we
enabled it for `bevy_reflect` through `bevy_platform` anyways. (Complex
features still confuse me a bit so let me know if I can just remove it!)

I also went ahead and preemptively implemented `TypePath` for `PassHash`
while I was here.

## Testing

You can test that it works by adding the following to a Bevy example
based on this PR (you'll also need to include `hashbrown` of course):

```rust
#[derive(Reflect)]
struct Foo(hashbrown::HashMap<String, String>);
```

Then check it compiles with:

```
cargo check --example hello_world --no-default-features --features=bevy_reflect/hashbrown
```
2025-05-30 22:59:09 +02:00
..
enums Rename bevy_platform_support to bevy_platform (#18813) 2025-04-14 22:45:27 +02:00
func Rename bevy_platform_support to bevy_platform (#18813) 2025-04-14 22:45:27 +02:00
impls bevy_reflect: Re-reflect hashbrown types (#18944) 2025-05-30 22:59:09 +02:00
path Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
serde Rename bevy_platform_support to bevy_platform (#18813) 2025-04-14 22:45:27 +02:00
array.rs bevy_reflect: Deprecate PartialReflect::clone_value (#18284) 2025-03-14 19:33:57 +00:00
attributes.rs Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
error.rs bevy_reflect: Reflection-based cloning (#13432) 2025-03-11 06:02:59 +00:00
fields.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-14 22:45:27 +02:00
from_reflect.rs bevy_reflect: Apply #[deny(clippy::allow_attributes, clippy::allow_attributes_without_reason)] (#17092) 2025-01-03 22:22:34 +00:00
generics.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-14 22:45:27 +02:00
kind.rs Remove Implicit std Prelude from no_std Crates (#17086) 2025-01-03 01:58:43 +00:00
lib.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-14 22:45:27 +02:00
list.rs bevy_reflect: Deprecate PartialReflect::clone_value (#18284) 2025-03-14 19:33:57 +00:00
map.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-14 22:45:27 +02:00
reflect.rs bevy_reflect: Deprecate PartialReflect::clone_value (#18284) 2025-03-14 19:33:57 +00:00
reflectable.rs bevy_reflect: Add Reflectable trait (#5772) 2024-09-18 00:36:41 +00:00
remote.rs Add no_std support to bevy_reflect (#16256) 2024-12-05 21:15:21 +00:00
set.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-14 22:45:27 +02:00
std_traits.rs Add no_std support to bevy_reflect (#16256) 2024-12-05 21:15:21 +00:00
struct_trait.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-14 22:45:27 +02:00
tuple_struct.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-14 22:45:27 +02:00
tuple.rs bevy_reflect: Deprecate PartialReflect::clone_value (#18284) 2025-03-14 19:33:57 +00:00
type_info_stack.rs Remove Implicit std Prelude from no_std Crates (#17086) 2025-01-03 01:58:43 +00:00
type_info.rs bevy_reflect: Deprecate PartialReflect::clone_value (#18284) 2025-03-14 19:33:57 +00:00
type_path.rs Add no_std support to bevy_reflect (#16256) 2024-12-05 21:15:21 +00:00
type_registry.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-14 22:45:27 +02:00
utility.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-14 22:45:27 +02:00