mirror of
https://github.com/rust-lang/cargo
synced 2024-09-13 21:11:44 +00:00
feat(toml): Warn on unset Edition
This commit is contained in:
parent
0955a80a07
commit
0f9d4a352a
|
@ -570,6 +570,11 @@ pub fn to_real_manifest(
|
|||
package.edition = Some(manifest::InheritableField::Value(edition.to_string()));
|
||||
edition
|
||||
} else {
|
||||
warnings.push(format!(
|
||||
"no edition set: defaulting to the {} edition while the latest is {}",
|
||||
Edition::Edition2015,
|
||||
Edition::LATEST_STABLE
|
||||
));
|
||||
Edition::Edition2015
|
||||
};
|
||||
// Add these lines if start a new unstable edition.
|
||||
|
|
|
@ -141,6 +141,7 @@ fn unset_edition_works_on_old_msrv() {
|
|||
p.cargo("check -v")
|
||||
.with_stderr(
|
||||
"\
|
||||
[WARNING] no edition set: defaulting to the 2015 edition while the latest is 2021
|
||||
[CHECKING] foo [..]
|
||||
[RUNNING] `rustc [..] --edition=2015 [..]`
|
||||
[FINISHED] [..]
|
||||
|
|
Loading…
Reference in a new issue