From d1c8e2bac04c8eef1415571b618913c48fa6b326 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sun, 24 Nov 2024 09:04:55 -0800 Subject: [PATCH] Update some tests for 2024 stabilization --- src/cargo/util/toml/embedded.rs | 4 ++-- .../out/crates/foo/Cargo.toml | 2 +- tests/testsuite/edition.rs | 2 +- tests/testsuite/new.rs | 2 +- tests/testsuite/publish.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cargo/util/toml/embedded.rs b/src/cargo/util/toml/embedded.rs index 6f569b94cf06..155b54cb18c3 100644 --- a/src/cargo/util/toml/embedded.rs +++ b/src/cargo/util/toml/embedded.rs @@ -567,7 +567,7 @@ autoexamples = false autolib = false autotests = false build = false -edition = "2021" +edition = "2024" name = "test-" [profile.release] @@ -605,7 +605,7 @@ autoexamples = false autolib = false autotests = false build = false -edition = "2021" +edition = "2024" name = "test-" [profile.release] diff --git a/tests/testsuite/cargo_new/inherit_workspace_package_table_with_edition/out/crates/foo/Cargo.toml b/tests/testsuite/cargo_new/inherit_workspace_package_table_with_edition/out/crates/foo/Cargo.toml index dd156239829d..90e45dafa85a 100644 --- a/tests/testsuite/cargo_new/inherit_workspace_package_table_with_edition/out/crates/foo/Cargo.toml +++ b/tests/testsuite/cargo_new/inherit_workspace_package_table_with_edition/out/crates/foo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "foo" -edition = "2024" +edition = "2021" authors.workspace = true description.workspace = true homepage.workspace = true diff --git a/tests/testsuite/edition.rs b/tests/testsuite/edition.rs index 92f75b181d41..7b22c2dbda86 100644 --- a/tests/testsuite/edition.rs +++ b/tests/testsuite/edition.rs @@ -135,7 +135,7 @@ fn unset_edition_with_unset_rust_version() { p.cargo("check -v") .with_stderr_data(str![[r#" -[WARNING] no edition set: defaulting to the 2015 edition while the latest is 2021 +[WARNING] no edition set: defaulting to the 2015 edition while the latest is 2024 [CHECKING] foo v0.1.0 ([ROOT]/foo) [RUNNING] `rustc [..] --edition=2015 [..]` [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s diff --git a/tests/testsuite/new.rs b/tests/testsuite/new.rs index f60849b562f0..44959764eb7a 100644 --- a/tests/testsuite/new.rs +++ b/tests/testsuite/new.rs @@ -393,7 +393,7 @@ fn new_with_edition_2018() { fn new_default_edition() { cargo_process("new foo").run(); let manifest = fs::read_to_string(paths::root().join("foo/Cargo.toml")).unwrap(); - assert!(manifest.contains("edition = \"2021\"")); + assert!(manifest.contains("edition = \"2024\"")); } #[cargo_test] diff --git a/tests/testsuite/publish.rs b/tests/testsuite/publish.rs index 403473ed3a3a..961af6ad0881 100644 --- a/tests/testsuite/publish.rs +++ b/tests/testsuite/publish.rs @@ -160,7 +160,7 @@ See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.1 ([ROOT]/foo) -[WARNING] no edition set: defaulting to the 2015 edition while the latest is 2021 +[WARNING] no edition set: defaulting to the 2015 edition while the latest is 2024 [COMPILING] foo v0.0.1 ([ROOT]/foo/target/package/foo-0.0.1) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [UPLOADING] foo v0.0.1 ([ROOT]/foo)