From 052b9d8261ffedd098bc1f0080659c88b3483ec5 Mon Sep 17 00:00:00 2001 From: Christian Hughes <9044780+ItsDoot@users.noreply.github.com> Date: Fri, 21 Feb 2025 00:13:36 -0600 Subject: [PATCH] Fix issue with `define_label!` instantiation in a 3rd party crate (#17958) # Objective Calling `define_label!` in a `no_std` 3rd party crate currently requires the user to import `Box` themselves due to a non-fully-specified reference to `Box`. ## Solution Add a fully specified path for `Box` in the one location necessary, to match all of the other cases. --- crates/bevy_ecs/src/label.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_ecs/src/label.rs b/crates/bevy_ecs/src/label.rs index 10a23cfb89..d57ec621fb 100644 --- a/crates/bevy_ecs/src/label.rs +++ b/crates/bevy_ecs/src/label.rs @@ -180,7 +180,7 @@ macro_rules! define_label { impl $crate::intern::Internable for dyn $label_trait_name { fn leak(&self) -> &'static Self { - Box::leak(self.dyn_clone()) + $crate::label::Box::leak(self.dyn_clone()) } fn ref_eq(&self, other: &Self) -> bool {