Open
Description
Problem
For a Rust package written and compiled with edition 2021 before, if we do not use cargo clean
to remove target
directory, and change the edition in Cargo.toml
from "2021" to "2024", the compilation cannot report correctly.
Steps
- Compile a Rust package of edition 2021 (with some codes that compile in 2021 but not compile in 2024)
- Change edition from 2021 to 2024
- Compile again, it does not say anything wrong
cargo clean
- Compile again. It now correctly reports something is wrong.
Possible Solution(s)
No response
Notes
No response
Version
cargo 1.85.0 (d73d2caf9 2024-12-31)
release: 1.85.0
commit-hash: d73d2caf9e41a39daf2a8d6ce60ec80bf354d2a7
commit-date: 2024-12-31
host: x86_64-unknown-linux-gnu
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Ubuntu 22.4.0 (jammy) [64-bit]