It turned out that I was using a version of Rust that was simply too old. Moving my code to Github codespaces immediately fixed everything and so did upgrading my local setup.