Skip to content

Commit

Permalink
Update derive(DynamicPlugin) to edition 2021 (#3038)
Browse files Browse the repository at this point in the history
# Objective
Edition 2021 requires `dyn Trait` and it won't compile without `dyn`.

## Solution
Added `dyn`.
  • Loading branch information
Iaiao committed Oct 27, 2021
1 parent ffde86e commit 91c3b21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_derive/src/app_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 91c3b21

Please sign in to comment.