Open Rigidity opened 2 months ago
Isn't this already handled by Bevy natively via a runtime error?
Isn't this already handled by Bevy natively via a runtime error?
I believe it is, which is why I've personally marked it as low priority. The reason you'd want a lint as well is for the Rust-Analyzer warning during development and the nice suggestion.
This is a nice to have feature, but probably shouldn't be worked on when more useful lints also need to be implemented. (Though I wouldn't object to someone else writing this lint in their own time! I'd still review it 😄)
RA highlighting is a good point I haven't considered :)
I believe there should be a lint to catch the scenario of having two or more queries which violate Rust's aliasing rules for components. I'd name it something like
query_conflict
and make itdeny
by default.For example:
query_1: Query<&mut A, With<B>>, query_2: Query<&mut A, With<C>>
Would give an error something like: