@@ -35,14 +35,14 @@ pub(crate) fn item_struct(
35
35
#derive_macro_call
36
36
#item_attrs
37
37
#visibility struct #item_struct_name #user_impl_generics_with_world #user_where_clauses_with_world {
38
- #( #( #field_attrs) * #field_visibilities #field_idents: <#field_types as #path:: query:: WorldQuery >:: Item <' __w>, ) *
38
+ #( #( #field_attrs) * #field_visibilities #field_idents: <#field_types as #path:: query:: WorldQuery >:: Item <' __w, ' __s >, ) *
39
39
}
40
40
} ,
41
41
Fields :: Unnamed ( _) => quote ! {
42
42
#derive_macro_call
43
43
#item_attrs
44
44
#visibility struct #item_struct_name #user_impl_generics_with_world #user_where_clauses_with_world(
45
- #( #field_visibilities <#field_types as #path:: query:: WorldQuery >:: Item <' __w>, ) *
45
+ #( #field_visibilities <#field_types as #path:: query:: WorldQuery >:: Item <' __w, ' __s >, ) *
46
46
) ;
47
47
} ,
48
48
Fields :: Unit => quote ! {
@@ -82,16 +82,16 @@ pub(crate) fn world_query_impl(
82
82
) ]
83
83
#[ automatically_derived]
84
84
#visibility struct #fetch_struct_name #user_impl_generics_with_world #user_where_clauses_with_world {
85
- #( #named_field_idents: <#field_types as #path:: query:: WorldQuery >:: Fetch <' __w>, ) *
86
- #marker_name: & ' __w ( ) ,
85
+ #( #named_field_idents: <#field_types as #path:: query:: WorldQuery >:: Fetch <' __w, ' __s >, ) *
86
+ #marker_name: ( & ' __w( ) , & ' __s ( ) ) ,
87
87
}
88
88
89
89
impl #user_impl_generics_with_world Clone for #fetch_struct_name #user_ty_generics_with_world
90
90
#user_where_clauses_with_world {
91
91
fn clone( & self ) -> Self {
92
92
Self {
93
93
#( #named_field_idents: self . #named_field_idents. clone( ) , ) *
94
- #marker_name: & ( ) ,
94
+ #marker_name: ( & ( ) , & ( ) ) ,
95
95
}
96
96
}
97
97
}
@@ -100,37 +100,37 @@ pub(crate) fn world_query_impl(
100
100
unsafe impl #user_impl_generics #path:: query:: WorldQuery
101
101
for #struct_name #user_ty_generics #user_where_clauses {
102
102
103
- type Item <' __w> = #item_struct_name #user_ty_generics_with_world;
104
- type Fetch <' __w> = #fetch_struct_name #user_ty_generics_with_world;
103
+ type Item <' __w, ' __s > = #item_struct_name #user_ty_generics_with_world;
104
+ type Fetch <' __w, ' __s > = #fetch_struct_name #user_ty_generics_with_world;
105
105
type State = #state_struct_name #user_ty_generics;
106
106
107
- fn shrink<' __wlong: ' __wshort, ' __wshort>(
108
- item: <#struct_name #user_ty_generics as #path:: query:: WorldQuery >:: Item <' __wlong>
109
- ) -> <#struct_name #user_ty_generics as #path:: query:: WorldQuery >:: Item <' __wshort> {
107
+ fn shrink<' __wlong: ' __wshort, ' __wshort, ' __s >(
108
+ item: <#struct_name #user_ty_generics as #path:: query:: WorldQuery >:: Item <' __wlong, ' __s >
109
+ ) -> <#struct_name #user_ty_generics as #path:: query:: WorldQuery >:: Item <' __wshort, ' __s > {
110
110
#item_struct_name {
111
111
#(
112
112
#field_idents: <#field_types>:: shrink( item. #field_idents) ,
113
113
) *
114
114
}
115
115
}
116
116
117
- fn shrink_fetch<' __wlong: ' __wshort, ' __wshort>(
118
- fetch: <#struct_name #user_ty_generics as #path:: query:: WorldQuery >:: Fetch <' __wlong>
119
- ) -> <#struct_name #user_ty_generics as #path:: query:: WorldQuery >:: Fetch <' __wshort> {
117
+ fn shrink_fetch<' __wlong: ' __wshort, ' __wshort, ' __s >(
118
+ fetch: <#struct_name #user_ty_generics as #path:: query:: WorldQuery >:: Fetch <' __wlong, ' __s >
119
+ ) -> <#struct_name #user_ty_generics as #path:: query:: WorldQuery >:: Fetch <' __wshort, ' __s > {
120
120
#fetch_struct_name {
121
121
#(
122
122
#named_field_idents: <#field_types>:: shrink_fetch( fetch. #named_field_idents) ,
123
123
) *
124
- #marker_name: & ( ) ,
124
+ #marker_name: ( & ( ) , & ( ) ) ,
125
125
}
126
126
}
127
127
128
- unsafe fn init_fetch<' __w>(
128
+ unsafe fn init_fetch<' __w, ' __s >(
129
129
_world: #path:: world:: unsafe_world_cell:: UnsafeWorldCell <' __w>,
130
- state: & Self :: State ,
130
+ state: & ' __s Self :: State ,
131
131
_last_run: #path:: component:: Tick ,
132
132
_this_run: #path:: component:: Tick ,
133
- ) -> <Self as #path:: query:: WorldQuery >:: Fetch <' __w> {
133
+ ) -> <Self as #path:: query:: WorldQuery >:: Fetch <' __w, ' __s > {
134
134
#fetch_struct_name {
135
135
#( #named_field_idents:
136
136
<#field_types>:: init_fetch(
@@ -140,17 +140,17 @@ pub(crate) fn world_query_impl(
140
140
_this_run,
141
141
) ,
142
142
) *
143
- #marker_name: & ( ) ,
143
+ #marker_name: ( & ( ) , & ( ) ) ,
144
144
}
145
145
}
146
146
147
147
const IS_DENSE : bool = true #( && <#field_types>:: IS_DENSE ) * ;
148
148
149
149
/// SAFETY: we call `set_archetype` for each member that implements `Fetch`
150
150
#[ inline]
151
- unsafe fn set_archetype<' __w>(
152
- _fetch: & mut <Self as #path:: query:: WorldQuery >:: Fetch <' __w>,
153
- _state: & Self :: State ,
151
+ unsafe fn set_archetype<' __w, ' __s >(
152
+ _fetch: & mut <Self as #path:: query:: WorldQuery >:: Fetch <' __w, ' __s >,
153
+ _state: & ' __s Self :: State ,
154
154
_archetype: & ' __w #path:: archetype:: Archetype ,
155
155
_table: & ' __w #path:: storage:: Table
156
156
) {
@@ -159,21 +159,21 @@ pub(crate) fn world_query_impl(
159
159
160
160
/// SAFETY: we call `set_table` for each member that implements `Fetch`
161
161
#[ inline]
162
- unsafe fn set_table<' __w>(
163
- _fetch: & mut <Self as #path:: query:: WorldQuery >:: Fetch <' __w>,
164
- _state: & Self :: State ,
162
+ unsafe fn set_table<' __w, ' __s >(
163
+ _fetch: & mut <Self as #path:: query:: WorldQuery >:: Fetch <' __w, ' __s >,
164
+ _state: & ' __s Self :: State ,
165
165
_table: & ' __w #path:: storage:: Table
166
166
) {
167
167
#( <#field_types>:: set_table( & mut _fetch. #named_field_idents, & _state. #named_field_idents, _table) ; ) *
168
168
}
169
169
170
170
/// SAFETY: we call `fetch` for each member that implements `Fetch`.
171
171
#[ inline( always) ]
172
- unsafe fn fetch<' __w>(
173
- _fetch: & mut <Self as #path:: query:: WorldQuery >:: Fetch <' __w>,
172
+ unsafe fn fetch<' __w, ' __s >(
173
+ _fetch: & mut <Self as #path:: query:: WorldQuery >:: Fetch <' __w, ' __s >,
174
174
_entity: #path:: entity:: Entity ,
175
175
_table_row: #path:: storage:: TableRow ,
176
- ) -> <Self as #path:: query:: WorldQuery >:: Item <' __w> {
176
+ ) -> <Self as #path:: query:: WorldQuery >:: Item <' __w, ' __s > {
177
177
Self :: Item {
178
178
#( #field_idents: <#field_types>:: fetch( & mut _fetch. #named_field_idents, _entity, _table_row) , ) *
179
179
}
0 commit comments