The assert!() macro supports formatting. Rust 2021 no longer
supports an unnecessary format!() inside it. I noticed because I
recently update my Rust toolchain and test-check-cargo-lock.t
started failing.
Details
- Reviewers
SimonSapin Alphare pulkit - Group Reviewers
hg-reviewers - Commits
- rHGf2fc34e88238: copies-rust: remove an unnecessary format!() inside assert!()
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
I recently update my Rust toolchain and test-check-cargo-lock.t started failing.
If most of Cargo.lock was rewritten this is likely that the file was upgraded to the newer format: https://blog.rust-lang.org/2020/01/30/Rust-1.41.0.html#less-conflict-prone-cargolock-format. Lately I’ve been reverting that change with hg revert rust/Cargo.lock && (cd rust && cargo +1.41.1 fetch) which Cargo does automatically every time I change a Cargo.toml file such as to add a dependency.
But looking up this blog post I see that support for this new format was introduced in 1.40.0. Since the oldest version we support is 1.41.1 (for Debian) maybe we should just do the upgrade.
But looking up this blog post I see that support for this new format was introduced in 1.40.0. Since the oldest version we support is 1.41.1 (for Debian) maybe we should just do the upgrade.
Agreed
Nope, I think it was just that the compiler started issuing a warning and that warning showed up when running the test