bevy/crates
Gino Valente aeef1c0f20
bevy_reflect: Update internal docs regarding anonymous function type names (#14666)
# Objective

As pointed out by @SkiFire13 on
[Discord](https://discord.com/channels/691052431525675048/1002362493634629796/1270624366119485441),
I was incorrect in #14641 regarding the type name of anonymous
functions. I had stated that they will return something like `fn(i32,
i32) -> i32`, but this is wrong. They actually behave like closures
(despite not technically being closures) and return something more like
`foo::bar::{{closure}}`.

This isn't a major issue because the reasoning behind #14641 still
stands. However, the internal documentation should probably be updated
so future contributors don't believe the lies I left behind.

## Solution

Updated the internal documentation for `create_info` to reflect the
actual type name of an anonymous function.

In that same module, I also added a test for function pointers and
updated all tests to include sanity checks for the `std::any::type_name`
of each category of callable.

## Testing

You can test locally by running:

```
cargo test --package bevy_reflect
```
2024-08-08 22:01:42 +00:00
..
bevy_a11y Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_animation Make AnimationPlayer::start and ::play work accordingly to documentation (#14546) 2024-07-31 14:07:53 +00:00
bevy_app bevy_reflect: Anonymous function parsing (#14641) 2024-08-07 03:11:08 +00:00
bevy_asset Making bevy_render an optional dependency for bevy_gizmos (#14448) 2024-08-06 13:09:10 +00:00
bevy_audio Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_color Glam 0.28 update - adopted (#14613) 2024-08-06 01:28:00 +00:00
bevy_core Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_core_pipeline Fix TAA on camera with viewport (#14582) 2024-08-07 23:59:38 +00:00
bevy_derive Remove deprecated bevy_dynamic_plugin (#14534) 2024-07-30 15:31:08 +00:00
bevy_dev_tools Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_diagnostic Add freebsd support for sysinfo (#14553) 2024-07-31 21:41:40 +00:00
bevy_dylib Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_ecs Adding Reflect data types for States and FreelyMutableState. (#14643) 2024-08-08 00:07:00 +00:00
bevy_encase_derive Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_gilrs Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_gizmos Add 2d opaque phase with depth buffer (#13069) 2024-08-07 00:22:09 +00:00
bevy_gltf Export glTF skins as a Gltf struct (#14343) 2024-08-06 01:14:42 +00:00
bevy_hierarchy Add link to with_children in with_child doc (#14604) 2024-08-04 13:36:52 +00:00
bevy_input Fix common capitalization errors in documentation (#14562) 2024-07-31 21:16:05 +00:00
bevy_internal Making bevy_render an optional dependency for bevy_gizmos (#14448) 2024-08-06 13:09:10 +00:00
bevy_log Fix common capitalization errors in documentation (#14562) 2024-07-31 21:16:05 +00:00
bevy_macro_utils Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_math Glam 0.28 update - adopted (#14613) 2024-08-06 01:28:00 +00:00
bevy_mikktspace Glam 0.28 update - adopted (#14613) 2024-08-06 01:28:00 +00:00
bevy_pbr Glam 0.28 update - adopted (#14613) 2024-08-06 01:28:00 +00:00
bevy_picking Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_ptr Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_reflect bevy_reflect: Update internal docs regarding anonymous function type names (#14666) 2024-08-08 22:01:42 +00:00
bevy_render Glam 0.28 update - adopted (#14613) 2024-08-06 01:28:00 +00:00
bevy_scene Change SceneInstanceReady to trigger an observer. (#13859) 2024-07-30 21:23:48 +00:00
bevy_sprite Add 2d opaque phase with depth buffer (#13069) 2024-08-07 00:22:09 +00:00
bevy_state bevy_state: Make reflect module public (#14667) 2024-08-08 20:15:38 +00:00
bevy_tasks Fix common capitalization errors in documentation (#14562) 2024-07-31 21:16:05 +00:00
bevy_text Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_time time_system is ambiguous_with event_update_system (#14544) 2024-07-31 12:13:17 +00:00
bevy_transform Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_ui Explicitly order CameraUpdateSystem before UiSystem::Prepare (#14609) 2024-08-04 13:34:51 +00:00
bevy_utils update hashbrown to 0.14.2 (#14603) 2024-08-04 13:23:28 +00:00
bevy_window Expose winit's MonitorHandle (#13669) 2024-08-06 10:54:37 +00:00
bevy_winit Expose winit's MonitorHandle (#13669) 2024-08-06 10:54:37 +00:00