Fix QueryData derive codegen (#19750)
Custom derived `QueryData` impls currently generate `Item` structs with the lifetimes swapped, which blows up the borrow checker sometimes. See: https://discord.com/channels/691052431525675048/749335865876021248/1385509416086011914 could add a regression test, TBH I don't know the error well enough to do that minimally. Seems like it's that both lifetimes on `QueryData::Item` need to be covariant, but I'm not sure.
This commit is contained in:
parent
b6bd205e8a
commit
8e1d0051d2
@ -83,7 +83,7 @@ pub fn derive_query_data_impl(input: TokenStream) -> TokenStream {
|
|||||||
let user_generics_with_world_and_state = {
|
let user_generics_with_world_and_state = {
|
||||||
let mut generics = ast.generics;
|
let mut generics = ast.generics;
|
||||||
generics.params.insert(0, parse_quote!('__w));
|
generics.params.insert(0, parse_quote!('__w));
|
||||||
generics.params.insert(0, parse_quote!('__s));
|
generics.params.insert(1, parse_quote!('__s));
|
||||||
generics
|
generics
|
||||||
};
|
};
|
||||||
let (
|
let (
|
||||||
|
Loading…
Reference in New Issue
Block a user