Skip to content

Commit

Permalink
bevyengine#5817: derive_bundle macro is not hygienic (bevyengine#5835)
Browse files Browse the repository at this point in the history
# Objective
- Fixes bevyengine#5817.
- Removes std::vec::Vec ambiguities in derive_bundle macro

## Solution
Prepend :: to standard library full Vec qualified type name (::std::vec::Vec)
  • Loading branch information
jgoday authored and ItsDoot committed Feb 1, 2023
1 parent 06b2731 commit 053c0e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_ecs/macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ pub fn derive_bundle(input: TokenStream) -> TokenStream {
fn component_ids(
components: &mut #ecs_path::component::Components,
storages: &mut #ecs_path::storage::Storages,
) -> Vec<#ecs_path::component::ComponentId> {
let mut component_ids = Vec::with_capacity(#field_len);
) -> ::std::vec::Vec<#ecs_path::component::ComponentId> {
let mut component_ids = ::std::vec::Vec::with_capacity(#field_len);
#(#field_component_ids)*
component_ids
}
Expand Down

0 comments on commit 053c0e5

Please sign in to comment.