I encountered this issue on Bevy: bevyengine/bevy#5788 Solution was to upgrade the edition to 2021. For a newcomer like me this was tricky to figure out, so it might be preferable to keep "edition" up to date.