You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #8243 - ehuss:patch-unused-can-update, r=alexcrichton
Fix `cargo update` with unused patch.
If you end up with an unused patch in `Cargo.lock`, then you try to update the patch to a version that does not match the original unused patch, and run `cargo update`, Cargo refuses to update it with the error "patch for `bar` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates". At this point, Cargo seems to be permanently stuck with no way to update it (unless you manually edit `Cargo.lock`).
The solution here is to add the unused patches to the "to_avoid" list, so that `cargo update` is allowed to update them.
I am uncertain if this is the best way to fix it, but seems to match my intuition of how `cargo update` is implemented.
0 commit comments