Cargo update for current cargo version

Hi, is there a way to specify the cargo version during cargo update? Because rn if I try to update it will update to packages that can't be compiled anymore by that cargo version.

If you are usimg rustup you can use cargo +1.50 update to use the cargo of rust 1.50. Not sure if rustup automatically installs it. If not you will need to do rustup toolchain install 1.50 first.

I think you might have misunderstood OP's question. I believe they're asking for something like a rust-version-field-aware resolver for cargo update, so that it doesn't upgrade to crate versions too new for the current/desired compiler to support.

I'm not entirely sure what the status quo is, but I - using a search engine - couldn't find anything about such a resolver existing yet, even on the latest nightly.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.