Link ComponentIdFor
in the ComponentId
related docs (#20127)
# Objective Fixes https://github.com/bevyengine/bevy/issues/19535. Improve interoperability of type documentation to make it easier for users to find related types ## Solution - Add a reference to [`ComponentIdFor`](crate::component::ComponentIdFor) in the `component_id` function documentation in `crates/bevy_ecs/src/world/mod.rs` - Add a reference to [`ComponentIdFor`](super::ComponentIdFor) in the `component_id` function documentation in `crates/bevy_ecs/src/component/info.rs` ## Testing - Verify documentation generation: `cargo doc` - Check the validity of cross-reference links in the documentation - Confirm that the documentation generated by rustdoc can correctly jump to the type definition of `ComponentIdFor`
This commit is contained in:
parent
b8072864aa
commit
6edfe1d39b
@ -641,6 +641,7 @@ impl Components {
|
||||
///
|
||||
/// # See also
|
||||
///
|
||||
/// * [`ComponentIdFor`](super::ComponentIdFor)
|
||||
/// * [`Components::get_id()`]
|
||||
/// * [`Components::resource_id()`]
|
||||
/// * [`World::component_id()`](crate::world::World::component_id)
|
||||
|
@ -602,6 +602,7 @@ impl World {
|
||||
///
|
||||
/// # See also
|
||||
///
|
||||
/// * [`ComponentIdFor`](crate::component::ComponentIdFor)
|
||||
/// * [`Components::component_id()`]
|
||||
/// * [`Components::get_id()`]
|
||||
#[inline]
|
||||
@ -704,7 +705,7 @@ impl World {
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// ## [`EntityHashSet`](crate::entity::EntityHashMap)
|
||||
/// ## [`EntityHashSet`](crate::entity::EntityHashSet)
|
||||
///
|
||||
/// ```
|
||||
/// # use bevy_ecs::{prelude::*, entity::EntityHashSet};
|
||||
@ -838,7 +839,7 @@ impl World {
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// ## [`EntityHashSet`](crate::entity::EntityHashMap)
|
||||
/// ## [`EntityHashSet`](crate::entity::EntityHashSet)
|
||||
///
|
||||
/// ```
|
||||
/// # use bevy_ecs::{prelude::*, entity::EntityHashSet};
|
||||
|
Loading…
Reference in New Issue
Block a user