Fix missing import in SubStates derive macro (#22892)#22929
Fix missing import in SubStates derive macro (#22892)#22929Cr0a3 wants to merge 2 commits intobevyengine:mainfrom
Conversation
|
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
alice-i-cecile
left a comment
There was a problem hiding this comment.
CI is complaining about duplicate imports; can you take a look?
|
AFAIK you shouldn't put You probably want something like: impl #impl_generics #state_trait_path for #struct_name #ty_generics #where_clause {
const DEPENDENCY_DEPTH : usize = <<Self as #trait_path>::SourceStates as #state_set_trait_path>::SET_DEPENDENCY_DEPTH + 1;
} |
Thank you |
Sure |
I now fixed the issue with the suggestion being helpful 😁 |
kfc35
left a comment
There was a problem hiding this comment.
Confirmed the provided fix works
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.