Skip to content

Commit 3069704

Browse files
authored
Fix missing import in SubStates derive macro (#22892) (#22929)
# Objective Hello, this pr fixes #22892 ## Solution I fixed the 'missing import' bug, by hard coding the import in the code generated by the proc macro. ## Testing The code example given in the issue now compiles fine.
1 parent 48f5911 commit 3069704

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_state/macros/src/states.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ pub fn derive_substates(input: TokenStream) -> TokenStream {
124124
}
125125

126126
impl #impl_generics #state_trait_path for #struct_name #ty_generics #where_clause {
127-
const DEPENDENCY_DEPTH : usize = <Self as #trait_path>::SourceStates::SET_DEPENDENCY_DEPTH + 1;
127+
const DEPENDENCY_DEPTH : usize = <<Self as #trait_path>::SourceStates as #state_set_trait_path>::SET_DEPENDENCY_DEPTH + 1;
128128
}
129129

130130
impl #impl_generics #state_mutation_trait_path for #struct_name #ty_generics #where_clause {

0 commit comments

Comments
 (0)