#Adding `windows: Query<&Window>` to my system produce compile error

3 messages · Page 1 of 1 (latest)

pliant canopy
#

When I add windows: Query<&Window> (precisely here: https://github.com/buxx/neoroll/blob/master/neoroll_gui/src/plugins/inputs/update.rs#L30) I got the following error :

error[E0277]: the trait bound `(for<'a, 'b, 'c, [...] is not satisfied
   --> neoroll_gui/src/plugins/inputs/mod.rs:21:34
    |
21  |             .add_systems(Update, (update_inputs, on_dragged_screen, on_window_resize));
    |              -----------         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IntoSystemConfigs<_>` is not implemented for `(fn(Query<'a, 'b, &Window>, ResMut<'d, ...>, ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ...) {update_inputs}, ..., ...)`
    |              |
    |              required by a bound introduced by this call
    |
    = help: the following other types implement trait `IntoSystemConfigs<Marker>`:
              <(S0,) as IntoSystemConfigs<(SystemConfigTupleMarker, P0)>>
              [...]as IntoSystemConfigs<(SystemConfigTupleMarker, P0, P1, P2, P3, P4, P5, P6, P7)>>
            and 12 others
note: required by a bound in `bevy::prelude::App::add_systems`
   --> /home/bastiensevajol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_app-0.11.3/src/app.rs:404:23
    |
401 |     pub fn add_systems<M>(
    |            ----------- required by a bound in this associated function
...
404 |         systems: impl IntoSystemConfigs<M>,
    |                       ^^^^^^^^^^^^^^^^^^^^ required by this bound in `App::add_systems`

Any idea ? I use it in other system like here: https://github.com/buxx/neoroll/blob/master/neoroll_gui/src/plugins/gui/detail.rs#L28

Thanks !

#

Adding windows: Query<&Window> to my system produce compile error

heavy rose