From 6826676e41f2ca0d12eb494a4c62e0ceeb2dde3e Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Fri, 9 May 2025 22:45:25 -0400 Subject: [PATCH] Fix macro pollution in SystemParam derive (#19155) # Objective Fixes #19130 ## Solution Fully quality `Result::Ok` so as to not accidentally invoke the anyhow function of the same name ## Testing Tested on this minimal repro with and without change. main.rs ```rs use anyhow::Ok; use bevy::ecs::system::SystemParam; #[derive(SystemParam)] pub struct SomeParams; fn main() { } ``` Cargo.toml ```toml [package] name = "bevy-playground" version = "0.1.0" edition = "2024" [dependencies] anyhow = "1.0.98" bevy = { path = "../bevy" } ``` --- crates/bevy_ecs/macros/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs index a657765ac2..410317a275 100644 --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -455,7 +455,7 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream { <#field_types as #path::system::SystemParam>::validate_param(#field_locals, _system_meta, _world) .map_err(|err| #path::system::SystemParamValidationError::new::(err.skipped, #field_messages, #field_names))?; )* - Ok(()) + Result::Ok(()) } #[inline]