From 46f68161f78a944c1751fb5a5780c689eaf82697 Mon Sep 17 00:00:00 2001 From: Javier Goday Date: Tue, 30 Aug 2022 02:07:47 +0000 Subject: [PATCH] #5817: derive_bundle macro is not hygienic (#5835) # Objective - Fixes #5817. - Removes std::vec::Vec ambiguities in derive_bundle macro ## Solution Prepend :: to standard library full Vec qualified type name (::std::vec::Vec) --- crates/bevy_ecs/macros/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs index 98fbe27200..f518e0a0e7 100644 --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -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 }