From 91c3b210a2b911039a588d6c2828c43cba21536e Mon Sep 17 00:00:00 2001 From: Iaiao Date: Wed, 27 Oct 2021 19:48:12 +0000 Subject: [PATCH] Update derive(DynamicPlugin) to edition 2021 (#3038) # Objective Edition 2021 requires `dyn Trait` and it won't compile without `dyn`. ## Solution Added `dyn`. --- crates/bevy_derive/src/app_plugin.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_derive/src/app_plugin.rs b/crates/bevy_derive/src/app_plugin.rs index 84b5bdf168a7b..56b5d1f0450eb 100644 --- a/crates/bevy_derive/src/app_plugin.rs +++ b/crates/bevy_derive/src/app_plugin.rs @@ -8,7 +8,7 @@ pub fn derive_dynamic_plugin(input: TokenStream) -> TokenStream { TokenStream::from(quote! { #[no_mangle] - pub extern "C" fn _bevy_create_plugin() -> *mut bevy::app::Plugin { + pub extern "C" fn _bevy_create_plugin() -> *mut dyn bevy::app::Plugin { // make sure the constructor is the correct type. let object = #struct_name {}; let boxed = Box::new(object);