Lock file version 4 requires `-Znext-lockfile-bump`

What causes the error in <topic>?

Was it because I accidentally checked in a Cargo.lock that was generated with beta/nightly and then attempted to use it with a stable toolchain?

1 Like

Is your stable toolchain older than 1.78.0? That was when Lockfile v4 got stabilised:

1 Like

No, I'm on 1.81.0 (on the system that exhibited the error):

$ rustc --version
rustc 1.81.0 (eeb90cda1 2024-09-04)

I simply removed Cargo.lock and let cargo regenerate it and the problem went away, but I'm curious what could have triggered it.

1 Like

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.