From 81411ec54580b43f25ce1a718ea430ce814b000f Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 15 Nov 2024 12:37:55 -0600 Subject: [PATCH] feat: Stabilize Edition 2024 --- src/cargo/core/features.rs | 10 +- src/cargo/util/toml/embedded.rs | 4 +- src/cargo/util/toml/mod.rs | 4 +- src/doc/man/generated_txt/cargo-init.txt | 2 +- src/doc/man/generated_txt/cargo-new.txt | 2 +- src/doc/man/includes/options-new.md | 2 +- src/doc/src/commands/cargo-init.md | 2 +- src/doc/src/commands/cargo-new.md | 2 +- src/doc/src/getting-started/first-steps.md | 2 +- src/doc/src/guide/creating-a-new-project.md | 2 +- src/doc/src/guide/dependencies.md | 2 +- .../src/reference/build-script-examples.md | 8 +- src/doc/src/reference/manifest.md | 4 +- src/doc/src/reference/registries.md | 2 +- src/doc/src/reference/resolver.md | 2 +- src/doc/src/reference/unstable.md | 34 +---- src/doc/src/reference/workspaces.md | 2 +- src/etc/man/cargo-init.1 | 2 +- src/etc/man/cargo-new.1 | 2 +- tests/testsuite/bad_config.rs | 61 ++------ .../cargo_init/auto_git/out/Cargo.toml | 2 +- .../out/Cargo.toml | 2 +- .../out/Cargo.toml | 2 +- .../out/Cargo.toml | 2 +- .../out/Cargo.toml | 2 +- .../out/Cargo.toml | 2 +- .../out/Cargo.toml | 2 +- .../out/Cargo.toml | 2 +- .../out/Cargo.toml | 2 +- .../out/Cargo.toml | 2 +- .../explicit_bin_with_git/out/Cargo.toml | 2 +- .../cargo_init/formats_source/out/Cargo.toml | 2 +- .../fossil_autodetect/out/Cargo.toml | 2 +- .../cargo_init/git_autodetect/out/Cargo.toml | 2 +- .../out/Cargo.toml | 2 +- .../inferred_bin_with_git/out/Cargo.toml | 2 +- .../inferred_lib_with_git/out/Cargo.toml | 2 +- .../lib_already_exists_nosrc/out/Cargo.toml | 2 +- .../lib_already_exists_src/out/Cargo.toml | 2 +- .../mercurial_autodetect/out/Cargo.toml | 2 +- .../pijul_autodetect/out/Cargo.toml | 2 +- .../cargo_init/simple_git/out/Cargo.toml | 2 +- .../cargo_init/simple_hg/out/Cargo.toml | 2 +- .../simple_hg_ignore_exists/out/Cargo.toml | 2 +- .../with_argument/out/foo/Cargo.toml | 2 +- .../out/crates/foo/Cargo.toml | 2 +- .../out/bar/Cargo.toml | 2 +- .../out/crates/foo/Cargo.toml | 2 +- .../out/crates/foo/Cargo.toml | 2 +- .../out/crates/foo/Cargo.toml | 2 +- .../out/crates/foo/Cargo.toml | 2 +- .../out/crates/foo/Cargo.toml | 2 +- .../out/crates/foo/Cargo.toml | 2 +- .../out/bar/Cargo.toml | 2 +- .../out/out-of-workspace/Cargo.toml | 2 +- .../out/crates/foo/Cargo.toml | 2 +- .../out/bar/Cargo.toml | 2 +- tests/testsuite/check.rs | 5 +- tests/testsuite/edition.rs | 2 +- tests/testsuite/fix.rs | 18 +-- .../testsuite/inheritable_workspace_fields.rs | 10 +- tests/testsuite/lockfile_path.rs | 4 +- tests/testsuite/new.rs | 4 +- tests/testsuite/publish.rs | 2 +- tests/testsuite/rust_version.rs | 10 +- tests/testsuite/script.rs | 144 +++++++++--------- 66 files changed, 165 insertions(+), 259 deletions(-) diff --git a/src/cargo/core/features.rs b/src/cargo/core/features.rs index 18e69104a73..55eae5f4795 100644 --- a/src/cargo/core/features.rs +++ b/src/cargo/core/features.rs @@ -202,9 +202,9 @@ impl Edition { /// The latest edition that is unstable. /// /// This is `None` if there is no next unstable edition. - pub const LATEST_UNSTABLE: Option = Some(Edition::Edition2024); + pub const LATEST_UNSTABLE: Option = None; /// The latest stable edition. - pub const LATEST_STABLE: Edition = Edition::Edition2021; + pub const LATEST_STABLE: Edition = Edition::Edition2024; pub const ALL: &'static [Edition] = &[ Self::Edition2015, Self::Edition2018, @@ -225,7 +225,7 @@ impl Edition { Edition2015 => None, Edition2018 => Some(semver::Version::new(1, 31, 0)), Edition2021 => Some(semver::Version::new(1, 56, 0)), - Edition2024 => None, + Edition2024 => Some(semver::Version::new(1, 85, 0)), } } @@ -236,7 +236,7 @@ impl Edition { Edition2015 => true, Edition2018 => true, Edition2021 => true, - Edition2024 => false, + Edition2024 => true, } } @@ -509,7 +509,7 @@ features! { (stable, workspace_inheritance, "1.64", "reference/unstable.html#workspace-inheritance"), /// Support for 2024 edition. - (unstable, edition2024, "", "reference/unstable.html#edition-2024"), + (stable, edition2024, "1.85", "reference/manifest.html#the-edition-field"), /// Allow setting trim-paths in a profile to control the sanitisation of file paths in build outputs. (unstable, trim_paths, "", "reference/unstable.html#profile-trim-paths-option"), diff --git a/src/cargo/util/toml/embedded.rs b/src/cargo/util/toml/embedded.rs index 6f569b94cf0..155b54cb18c 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/src/cargo/util/toml/mod.rs b/src/cargo/util/toml/mod.rs index c0f6df61d90..bd1fcf142c9 100644 --- a/src/cargo/util/toml/mod.rs +++ b/src/cargo/util/toml/mod.rs @@ -1217,9 +1217,7 @@ pub fn to_real_manifest( // features.require(Feature::edition20xx())?; // } // ``` - if edition == Edition::Edition2024 { - features.require(Feature::edition2024())?; - } else if !edition.is_stable() { + if !edition.is_stable() { // Guard in case someone forgets to add .require() return Err(util::errors::internal(format!( "edition {} should be gated", diff --git a/src/doc/man/generated_txt/cargo-init.txt b/src/doc/man/generated_txt/cargo-init.txt index 5c7e386c38b..0747257fd7a 100644 --- a/src/doc/man/generated_txt/cargo-init.txt +++ b/src/doc/man/generated_txt/cargo-init.txt @@ -30,7 +30,7 @@ OPTIONS Create a package with a library target (src/lib.rs). --edition edition - Specify the Rust edition to use. Default is 2021. Possible values: + Specify the Rust edition to use. Default is 2024. Possible values: 2015, 2018, 2021, 2024 --name name diff --git a/src/doc/man/generated_txt/cargo-new.txt b/src/doc/man/generated_txt/cargo-new.txt index 5f5ebbfbd6f..8aa420c7aa9 100644 --- a/src/doc/man/generated_txt/cargo-new.txt +++ b/src/doc/man/generated_txt/cargo-new.txt @@ -25,7 +25,7 @@ OPTIONS Create a package with a library target (src/lib.rs). --edition edition - Specify the Rust edition to use. Default is 2021. Possible values: + Specify the Rust edition to use. Default is 2024. Possible values: 2015, 2018, 2021, 2024 --name name diff --git a/src/doc/man/includes/options-new.md b/src/doc/man/includes/options-new.md index 0b39ae34f40..5711f2420ad 100644 --- a/src/doc/man/includes/options-new.md +++ b/src/doc/man/includes/options-new.md @@ -10,7 +10,7 @@ Create a package with a library target (`src/lib.rs`). {{/option}} {{#option "`--edition` _edition_" }} -Specify the Rust edition to use. Default is 2021. +Specify the Rust edition to use. Default is 2024. Possible values: 2015, 2018, 2021, 2024 {{/option}} diff --git a/src/doc/src/commands/cargo-init.md b/src/doc/src/commands/cargo-init.md index fad9401e242..e2188564705 100644 --- a/src/doc/src/commands/cargo-init.md +++ b/src/doc/src/commands/cargo-init.md @@ -39,7 +39,7 @@ This is the default behavior.
--edition edition
-
Specify the Rust edition to use. Default is 2021. +
Specify the Rust edition to use. Default is 2024. Possible values: 2015, 2018, 2021, 2024
diff --git a/src/doc/src/commands/cargo-new.md b/src/doc/src/commands/cargo-new.md index e10e2dcb9b1..8aed7fdf1f5 100644 --- a/src/doc/src/commands/cargo-new.md +++ b/src/doc/src/commands/cargo-new.md @@ -34,7 +34,7 @@ This is the default behavior.
--edition edition
-
Specify the Rust edition to use. Default is 2021. +
Specify the Rust edition to use. Default is 2024. Possible values: 2015, 2018, 2021, 2024
diff --git a/src/doc/src/getting-started/first-steps.md b/src/doc/src/getting-started/first-steps.md index e8ed21d1571..86f8b5f14b7 100644 --- a/src/doc/src/getting-started/first-steps.md +++ b/src/doc/src/getting-started/first-steps.md @@ -33,7 +33,7 @@ This is all we need to get started. First, let’s check out `Cargo.toml`: [package] name = "hello_world" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] ``` diff --git a/src/doc/src/guide/creating-a-new-project.md b/src/doc/src/guide/creating-a-new-project.md index f12fb865025..470b8bde41b 100644 --- a/src/doc/src/guide/creating-a-new-project.md +++ b/src/doc/src/guide/creating-a-new-project.md @@ -29,7 +29,7 @@ Let’s take a closer look at `Cargo.toml`: [package] name = "hello_world" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/src/doc/src/guide/dependencies.md b/src/doc/src/guide/dependencies.md index 531fe505b23..5f34b9fe04c 100644 --- a/src/doc/src/guide/dependencies.md +++ b/src/doc/src/guide/dependencies.md @@ -35,7 +35,7 @@ crates: [package] name = "hello_world" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] time = "0.1.12" diff --git a/src/doc/src/reference/build-script-examples.md b/src/doc/src/reference/build-script-examples.md index 9b7464134ce..014579d1f37 100644 --- a/src/doc/src/reference/build-script-examples.md +++ b/src/doc/src/reference/build-script-examples.md @@ -49,7 +49,7 @@ Here we can see that we have a `build.rs` build script and our binary in [package] name = "hello-from-generated-code" version = "0.1.0" -edition = "2021" +edition = "2024" ``` Let’s see what’s inside the build script: @@ -148,7 +148,7 @@ Pretty similar to before! Next, the manifest: [package] name = "hello-world-from-c" version = "0.1.0" -edition = "2021" +edition = "2024" ``` For now we’re not going to use any build dependencies, so let’s take a look at @@ -298,7 +298,7 @@ with `pkg-config` installed. Let's start by setting up the manifest: [package] name = "libz-sys" version = "0.1.0" -edition = "2021" +edition = "2024" links = "z" [build-dependencies] @@ -385,7 +385,7 @@ Here's an example: [package] name = "zuser" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] libz-sys = "1.0.25" diff --git a/src/doc/src/reference/manifest.md b/src/doc/src/reference/manifest.md index 95de8286e4f..5026c9f40a3 100644 --- a/src/doc/src/reference/manifest.md +++ b/src/doc/src/reference/manifest.md @@ -151,12 +151,12 @@ examples, etc. ```toml [package] # ... -edition = '2021' +edition = '2024' ``` Most manifests have the `edition` field filled in automatically by [`cargo new`] with the latest stable edition. By default `cargo new` creates a manifest with -the 2021 edition currently. +the 2024 edition currently. If the `edition` field is not present in `Cargo.toml`, then the 2015 edition is assumed for backwards compatibility. Note that all manifests diff --git a/src/doc/src/reference/registries.md b/src/doc/src/reference/registries.md index f0554be980e..12c91f1ae2a 100644 --- a/src/doc/src/reference/registries.md +++ b/src/doc/src/reference/registries.md @@ -38,7 +38,7 @@ in `Cargo.toml`: [package] name = "my-project" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] other-crate = { version = "1.0", registry = "my-registry" } diff --git a/src/doc/src/reference/resolver.md b/src/doc/src/reference/resolver.md index bc41517b21f..f080509fc58 100644 --- a/src/doc/src/reference/resolver.md +++ b/src/doc/src/reference/resolver.md @@ -507,7 +507,7 @@ resolver = "2" - `"2"` ([`edition = "2021"`](manifest.md#the-edition-field) default): Introduces changes in [feature unification](#features). See the [features chapter][features-2] for more details. -- `"3"` (requires Rust 1.84+): Change the default for [`resolver.incompatible-rust-versions`] from `allow` to `fallback` +- `"3"` ([`edition = "2024"`](manifest.md#the-edition-field) default, requires Rust 1.84+): Change the default for [`resolver.incompatible-rust-versions`] from `allow` to `fallback` The resolver is a global option that affects the entire workspace. The `resolver` version in dependencies is ignored, only the value in the top-level diff --git a/src/doc/src/reference/unstable.md b/src/doc/src/reference/unstable.md index c59600a5d5e..7dcf79dc7b1 100644 --- a/src/doc/src/reference/unstable.md +++ b/src/doc/src/reference/unstable.md @@ -100,7 +100,6 @@ Each new feature described below should explain how to use it. * [codegen-backend](#codegen-backend) --- Select the codegen backend used by rustc. * [per-package-target](#per-package-target) --- Sets the `--target` to use for each individual package. * [artifact dependencies](#artifact-dependencies) --- Allow build artifacts to be included into other build artifacts and build them for different targets. - * [Edition 2024](#edition-2024) — Adds support for the 2024 Edition. * [Profile `trim-paths` option](#profile-trim-paths-option) --- Control the sanitization of file paths in build outputs. * [`[lints.cargo]`](#lintscargo) --- Allows configuring lints for Cargo. * [path bases](#path-bases) --- Named base directories for path dependencies. @@ -1363,32 +1362,6 @@ Differences between `cargo run --manifest-path ` and `cargo ` ### Documentation Updates -## Edition 2024 -* Tracking Issue: (none created yet) -* RFC: [rust-lang/rfcs#3501](https://github.com/rust-lang/rfcs/pull/3501) - -Support for the 2024 [edition] can be enabled by adding the `edition2024` -unstable feature to the top of `Cargo.toml`: - -```toml -cargo-features = ["edition2024"] - -[package] -name = "my-package" -version = "0.1.0" -edition = "2024" -``` - -If you want to transition an existing project from a previous edition, then -`cargo fix --edition` can be used on the nightly channel. After running `cargo -fix`, you can switch the edition to 2024 as illustrated above. - -This feature is very unstable, and is only intended for early testing and -experimentation. Future nightly releases may introduce changes for the 2024 -edition that may break your build. - -[edition]: ../../edition-guide/index.html - ## Profile `trim-paths` option * Tracking Issue: [rust-lang/cargo#12137](https://github.com/rust-lang/cargo/issues/12137) @@ -2013,3 +1986,10 @@ default behavior. See the [build script documentation](build-scripts.md#rustc-check-cfg) for information about specifying custom cfgs. + +## Edition 2024 + +The 2024 edition has been stabilized in the 1.85 release. +See the [`edition` field](manifest.md#the-edition-field) for more information on setting the edition. +See [`cargo fix --edition`](../commands/cargo-fix.md) and [The Edition Guide](../../edition-guide/index.html) for more information on migrating existing projects. + diff --git a/src/doc/src/reference/workspaces.md b/src/doc/src/reference/workspaces.md index 4cbf212952d..ddbe36fd1ad 100644 --- a/src/doc/src/reference/workspaces.md +++ b/src/doc/src/reference/workspaces.md @@ -76,7 +76,7 @@ resolver = "2" [package] name = "hello_world" # the name of the package version = "0.1.0" # the current version, obeying semver -edition = "2021" # the edition, will have no effect on a resolver used in the workspace +edition = "2024" # the edition, will have no effect on a resolver used in the workspace authors = ["Alice ", "Bob "] ``` diff --git a/src/etc/man/cargo-init.1 b/src/etc/man/cargo-init.1 index b37622b528b..74f02ef09fe 100644 --- a/src/etc/man/cargo-init.1 +++ b/src/etc/man/cargo-init.1 @@ -36,7 +36,7 @@ Create a package with a library target (\fBsrc/lib.rs\fR). .sp \fB\-\-edition\fR \fIedition\fR .RS 4 -Specify the Rust edition to use. Default is 2021. +Specify the Rust edition to use. Default is 2024. Possible values: 2015, 2018, 2021, 2024 .RE .sp diff --git a/src/etc/man/cargo-new.1 b/src/etc/man/cargo-new.1 index f1939a54368..87a1c7f1c7d 100644 --- a/src/etc/man/cargo-new.1 +++ b/src/etc/man/cargo-new.1 @@ -31,7 +31,7 @@ Create a package with a library target (\fBsrc/lib.rs\fR). .sp \fB\-\-edition\fR \fIedition\fR .RS 4 -Specify the Rust edition to use. Default is 2021. +Specify the Rust edition to use. Default is 2024. Possible values: 2015, 2018, 2021, 2024 .RE .sp diff --git a/tests/testsuite/bad_config.rs b/tests/testsuite/bad_config.rs index ace08f4392f..bf1b0da2a34 100644 --- a/tests/testsuite/bad_config.rs +++ b/tests/testsuite/bad_config.rs @@ -831,14 +831,12 @@ fn dev_dependencies2() { "#]]).run(); } -#[cargo_test(nightly, reason = "edition2024 is not stable")] +#[cargo_test] fn dev_dependencies2_2024() { let p = project() .file( "Cargo.toml", r#" - cargo-features = ["edition2024"] - [package] name = "foo" version = "0.1.0" @@ -861,7 +859,6 @@ fn dev_dependencies2_2024() { .file("a/src/lib.rs", "") .build(); p.cargo("check") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_status(101) .with_stderr_data(str![[r#" [ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml` @@ -949,14 +946,12 @@ fn build_dependencies2() { "#]]).run(); } -#[cargo_test(nightly, reason = "edition2024 is not stable")] +#[cargo_test] fn build_dependencies2_2024() { let p = project() .file( "Cargo.toml", r#" - cargo-features = ["edition2024"] - [package] name = "foo" version = "0.1.0" @@ -979,7 +974,6 @@ fn build_dependencies2_2024() { .file("a/src/lib.rs", "") .build(); p.cargo("check") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_status(101) .with_stderr_data(str![[r#" [ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml` @@ -1060,14 +1054,12 @@ fn lib_crate_type2() { .run(); } -#[cargo_test(nightly, reason = "edition2024 is not stable")] +#[cargo_test] fn lib_crate_type2_2024() { let p = project() .file( "Cargo.toml", r#" - cargo-features = ["edition2024"] - [package] name = "foo" version = "0.5.0" @@ -1082,7 +1074,6 @@ fn lib_crate_type2_2024() { .file("src/lib.rs", "pub fn foo() {}") .build(); p.cargo("check") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_status(101) .with_stderr_data(str![[r#" [ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml` @@ -1154,14 +1145,12 @@ fn bin_crate_type2() { .run(); } -#[cargo_test(nightly, reason = "edition2024 is not stable")] +#[cargo_test] fn bin_crate_type2_2024() { let p = project() .file( "Cargo.toml", r#" - cargo-features = ["edition2024"] - [package] name = "foo" version = "0.5.0" @@ -1177,7 +1166,6 @@ fn bin_crate_type2_2024() { .file("src/main.rs", "fn main() {}") .build(); p.cargo("check") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_status(101) .with_stderr_data(str![[r#" [ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml` @@ -1268,14 +1256,12 @@ fn examples_crate_type2() { .run(); } -#[cargo_test(nightly, reason = "edition2024 is not stable")] +#[cargo_test] fn examples_crate_type2_2024() { let p = project() .file( "Cargo.toml", r#" - cargo-features = ["edition2024"] - [package] name = "foo" version = "0.5.0" @@ -1307,7 +1293,6 @@ fn examples_crate_type2_2024() { ) .build(); p.cargo("check") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_status(101) .with_stderr_data(str![[r#" [ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml` @@ -1411,7 +1396,7 @@ fn cargo_platform_build_dependencies2() { .run(); } -#[cargo_test(nightly, reason = "edition2024 is not stable")] +#[cargo_test] fn cargo_platform_build_dependencies2_2024() { let host = rustc_host(); let p = project() @@ -1419,8 +1404,6 @@ fn cargo_platform_build_dependencies2_2024() { "Cargo.toml", &format!( r#" - cargo-features = ["edition2024"] - [package] name = "foo" version = "0.5.0" @@ -1444,7 +1427,6 @@ fn cargo_platform_build_dependencies2_2024() { .build(); p.cargo("check") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_status(101) .with_stderr_data(str![[r#" [ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml` @@ -1543,7 +1525,7 @@ fn cargo_platform_dev_dependencies2() { .run(); } -#[cargo_test(nightly, reason = "edition2024 is not stable")] +#[cargo_test] fn cargo_platform_dev_dependencies2_2024() { let host = rustc_host(); let p = project() @@ -1551,8 +1533,6 @@ fn cargo_platform_dev_dependencies2_2024() { "Cargo.toml", &format!( r#" - cargo-features = ["edition2024"] - [package] name = "foo" version = "0.5.0" @@ -1575,7 +1555,6 @@ fn cargo_platform_dev_dependencies2_2024() { .build(); p.cargo("check") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_status(101) .with_stderr_data(str![[r#" [ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml` @@ -1675,14 +1654,12 @@ fn default_features2() { "#]]).run(); } -#[cargo_test(nightly, reason = "edition2024 is not stable")] +#[cargo_test] fn default_features2_2024() { let p = project() .file( "Cargo.toml", r#" - cargo-features = ["edition2024"] - [package] name = "foo" version = "0.1.0" @@ -1712,7 +1689,6 @@ fn default_features2_2024() { .build(); p.cargo("check") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_status(101) .with_stderr_data(str![[r#" [ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml` @@ -1852,7 +1828,7 @@ fn workspace_default_features2() { .run(); } -#[cargo_test(nightly, reason = "edition2024 is not stable")] +#[cargo_test] fn workspace_default_features2_2024() { let p = project() .file( @@ -1869,8 +1845,6 @@ fn workspace_default_features2_2024() { .file( "workspace_only/Cargo.toml", r#" - cargo-features = ["edition2024"] - [package] name = "workspace_only" version = "0.1.0" @@ -1885,8 +1859,6 @@ fn workspace_default_features2_2024() { .file( "dep_workspace_only/Cargo.toml", r#" - cargo-features = ["edition2024"] - [package] name = "dep_workspace_only" version = "0.1.0" @@ -1898,8 +1870,6 @@ fn workspace_default_features2_2024() { .file( "package_only/Cargo.toml", r#" - cargo-features = ["edition2024"] - [package] name = "package_only" version = "0.1.0" @@ -1914,8 +1884,6 @@ fn workspace_default_features2_2024() { .file( "dep_package_only/Cargo.toml", r#" - cargo-features = ["edition2024"] - [package] name = "dep_package_only" version = "0.1.0" @@ -1927,7 +1895,6 @@ fn workspace_default_features2_2024() { .build(); p.cargo("check") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_status(101) .with_stderr_data(str![[r#" [ERROR] failed to load manifest for workspace member `[ROOT]/foo/workspace_only` @@ -1972,14 +1939,12 @@ fn lib_proc_macro2() { .run(); } -#[cargo_test(nightly, reason = "edition2024 is not stable")] +#[cargo_test] fn lib_proc_macro2_2024() { let foo = project() .file( "Cargo.toml", r#" - cargo-features = ["edition2024"] - [package] name = "foo" version = "0.1.0" @@ -1992,7 +1957,6 @@ fn lib_proc_macro2_2024() { .build(); foo.cargo("check") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_status(101) .with_stderr_data(str![[r#" [ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml` @@ -2063,14 +2027,12 @@ fn bin_proc_macro2() { .run(); } -#[cargo_test(nightly, reason = "edition2024 is not stable")] +#[cargo_test] fn bin_proc_macro2_2024() { let foo = project() .file( "Cargo.toml", r#" - cargo-features = ["edition2024"] - [package] name = "foo" version = "0.5.0" @@ -2087,7 +2049,6 @@ fn bin_proc_macro2_2024() { .build(); foo.cargo("check") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_status(101) .with_stderr_data(str![[r#" [ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml` diff --git a/tests/testsuite/cargo_init/auto_git/out/Cargo.toml b/tests/testsuite/cargo_init/auto_git/out/Cargo.toml index dfab9e3fdbe..797f753b430 100644 --- a/tests/testsuite/cargo_init/auto_git/out/Cargo.toml +++ b/tests/testsuite/cargo_init/auto_git/out/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/bin_already_exists_explicit/out/Cargo.toml b/tests/testsuite/cargo_init/bin_already_exists_explicit/out/Cargo.toml index dfab9e3fdbe..797f753b430 100644 --- a/tests/testsuite/cargo_init/bin_already_exists_explicit/out/Cargo.toml +++ b/tests/testsuite/cargo_init/bin_already_exists_explicit/out/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/bin_already_exists_explicit_nosrc/out/Cargo.toml b/tests/testsuite/cargo_init/bin_already_exists_explicit_nosrc/out/Cargo.toml index 2a5dcadee6c..d0ebc5d6b30 100644 --- a/tests/testsuite/cargo_init/bin_already_exists_explicit_nosrc/out/Cargo.toml +++ b/tests/testsuite/cargo_init/bin_already_exists_explicit_nosrc/out/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/bin_already_exists_implicit/out/Cargo.toml b/tests/testsuite/cargo_init/bin_already_exists_implicit/out/Cargo.toml index dfab9e3fdbe..797f753b430 100644 --- a/tests/testsuite/cargo_init/bin_already_exists_implicit/out/Cargo.toml +++ b/tests/testsuite/cargo_init/bin_already_exists_implicit/out/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/bin_already_exists_implicit_namenosrc/out/Cargo.toml b/tests/testsuite/cargo_init/bin_already_exists_implicit_namenosrc/out/Cargo.toml index a16d0374d2e..fc26d6b815d 100644 --- a/tests/testsuite/cargo_init/bin_already_exists_implicit_namenosrc/out/Cargo.toml +++ b/tests/testsuite/cargo_init/bin_already_exists_implicit_namenosrc/out/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/bin_already_exists_implicit_namesrc/out/Cargo.toml b/tests/testsuite/cargo_init/bin_already_exists_implicit_namesrc/out/Cargo.toml index c318f457a3b..18e8d4eef01 100644 --- a/tests/testsuite/cargo_init/bin_already_exists_implicit_namesrc/out/Cargo.toml +++ b/tests/testsuite/cargo_init/bin_already_exists_implicit_namesrc/out/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/bin_already_exists_implicit_nosrc/out/Cargo.toml b/tests/testsuite/cargo_init/bin_already_exists_implicit_nosrc/out/Cargo.toml index 2a5dcadee6c..d0ebc5d6b30 100644 --- a/tests/testsuite/cargo_init/bin_already_exists_implicit_nosrc/out/Cargo.toml +++ b/tests/testsuite/cargo_init/bin_already_exists_implicit_nosrc/out/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/creates_binary_when_both_binlib_present/out/Cargo.toml b/tests/testsuite/cargo_init/creates_binary_when_both_binlib_present/out/Cargo.toml index 7b042d4bb13..5add2f88f26 100644 --- a/tests/testsuite/cargo_init/creates_binary_when_both_binlib_present/out/Cargo.toml +++ b/tests/testsuite/cargo_init/creates_binary_when_both_binlib_present/out/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/creates_binary_when_instructed_and_has_lib_file/out/Cargo.toml b/tests/testsuite/cargo_init/creates_binary_when_instructed_and_has_lib_file/out/Cargo.toml index a16d0374d2e..fc26d6b815d 100644 --- a/tests/testsuite/cargo_init/creates_binary_when_instructed_and_has_lib_file/out/Cargo.toml +++ b/tests/testsuite/cargo_init/creates_binary_when_instructed_and_has_lib_file/out/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/creates_library_when_instructed_and_has_bin_file/out/Cargo.toml b/tests/testsuite/cargo_init/creates_library_when_instructed_and_has_bin_file/out/Cargo.toml index 6fa93832300..51e0c792066 100644 --- a/tests/testsuite/cargo_init/creates_library_when_instructed_and_has_bin_file/out/Cargo.toml +++ b/tests/testsuite/cargo_init/creates_library_when_instructed_and_has_bin_file/out/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/explicit_bin_with_git/out/Cargo.toml b/tests/testsuite/cargo_init/explicit_bin_with_git/out/Cargo.toml index dfab9e3fdbe..797f753b430 100644 --- a/tests/testsuite/cargo_init/explicit_bin_with_git/out/Cargo.toml +++ b/tests/testsuite/cargo_init/explicit_bin_with_git/out/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/formats_source/out/Cargo.toml b/tests/testsuite/cargo_init/formats_source/out/Cargo.toml index dfab9e3fdbe..797f753b430 100644 --- a/tests/testsuite/cargo_init/formats_source/out/Cargo.toml +++ b/tests/testsuite/cargo_init/formats_source/out/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/fossil_autodetect/out/Cargo.toml b/tests/testsuite/cargo_init/fossil_autodetect/out/Cargo.toml index dfab9e3fdbe..797f753b430 100644 --- a/tests/testsuite/cargo_init/fossil_autodetect/out/Cargo.toml +++ b/tests/testsuite/cargo_init/fossil_autodetect/out/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/git_autodetect/out/Cargo.toml b/tests/testsuite/cargo_init/git_autodetect/out/Cargo.toml index 878c6729147..05126080007 100644 --- a/tests/testsuite/cargo_init/git_autodetect/out/Cargo.toml +++ b/tests/testsuite/cargo_init/git_autodetect/out/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "foo" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/ignores_failure_to_format_source/out/Cargo.toml b/tests/testsuite/cargo_init/ignores_failure_to_format_source/out/Cargo.toml index dfab9e3fdbe..797f753b430 100644 --- a/tests/testsuite/cargo_init/ignores_failure_to_format_source/out/Cargo.toml +++ b/tests/testsuite/cargo_init/ignores_failure_to_format_source/out/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/inferred_bin_with_git/out/Cargo.toml b/tests/testsuite/cargo_init/inferred_bin_with_git/out/Cargo.toml index 2a5dcadee6c..d0ebc5d6b30 100644 --- a/tests/testsuite/cargo_init/inferred_bin_with_git/out/Cargo.toml +++ b/tests/testsuite/cargo_init/inferred_bin_with_git/out/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/inferred_lib_with_git/out/Cargo.toml b/tests/testsuite/cargo_init/inferred_lib_with_git/out/Cargo.toml index 290552e56b5..2feac72d2b9 100644 --- a/tests/testsuite/cargo_init/inferred_lib_with_git/out/Cargo.toml +++ b/tests/testsuite/cargo_init/inferred_lib_with_git/out/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/lib_already_exists_nosrc/out/Cargo.toml b/tests/testsuite/cargo_init/lib_already_exists_nosrc/out/Cargo.toml index 290552e56b5..2feac72d2b9 100644 --- a/tests/testsuite/cargo_init/lib_already_exists_nosrc/out/Cargo.toml +++ b/tests/testsuite/cargo_init/lib_already_exists_nosrc/out/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/lib_already_exists_src/out/Cargo.toml b/tests/testsuite/cargo_init/lib_already_exists_src/out/Cargo.toml index dfab9e3fdbe..797f753b430 100644 --- a/tests/testsuite/cargo_init/lib_already_exists_src/out/Cargo.toml +++ b/tests/testsuite/cargo_init/lib_already_exists_src/out/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/mercurial_autodetect/out/Cargo.toml b/tests/testsuite/cargo_init/mercurial_autodetect/out/Cargo.toml index dfab9e3fdbe..797f753b430 100644 --- a/tests/testsuite/cargo_init/mercurial_autodetect/out/Cargo.toml +++ b/tests/testsuite/cargo_init/mercurial_autodetect/out/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/pijul_autodetect/out/Cargo.toml b/tests/testsuite/cargo_init/pijul_autodetect/out/Cargo.toml index dfab9e3fdbe..797f753b430 100644 --- a/tests/testsuite/cargo_init/pijul_autodetect/out/Cargo.toml +++ b/tests/testsuite/cargo_init/pijul_autodetect/out/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/simple_git/out/Cargo.toml b/tests/testsuite/cargo_init/simple_git/out/Cargo.toml index dfab9e3fdbe..797f753b430 100644 --- a/tests/testsuite/cargo_init/simple_git/out/Cargo.toml +++ b/tests/testsuite/cargo_init/simple_git/out/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/simple_hg/out/Cargo.toml b/tests/testsuite/cargo_init/simple_hg/out/Cargo.toml index dfab9e3fdbe..797f753b430 100644 --- a/tests/testsuite/cargo_init/simple_hg/out/Cargo.toml +++ b/tests/testsuite/cargo_init/simple_hg/out/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/simple_hg_ignore_exists/out/Cargo.toml b/tests/testsuite/cargo_init/simple_hg_ignore_exists/out/Cargo.toml index dfab9e3fdbe..797f753b430 100644 --- a/tests/testsuite/cargo_init/simple_hg_ignore_exists/out/Cargo.toml +++ b/tests/testsuite/cargo_init/simple_hg_ignore_exists/out/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "case" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/with_argument/out/foo/Cargo.toml b/tests/testsuite/cargo_init/with_argument/out/foo/Cargo.toml index 878c6729147..05126080007 100644 --- a/tests/testsuite/cargo_init/with_argument/out/foo/Cargo.toml +++ b/tests/testsuite/cargo_init/with_argument/out/foo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "foo" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_init/workspace_add_member/out/crates/foo/Cargo.toml b/tests/testsuite/cargo_init/workspace_add_member/out/crates/foo/Cargo.toml index 878c6729147..05126080007 100644 --- a/tests/testsuite/cargo_init/workspace_add_member/out/crates/foo/Cargo.toml +++ b/tests/testsuite/cargo_init/workspace_add_member/out/crates/foo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "foo" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_new/add_members_to_non_workspace/out/bar/Cargo.toml b/tests/testsuite/cargo_new/add_members_to_non_workspace/out/bar/Cargo.toml index fe23452f35a..845311fc806 100644 --- a/tests/testsuite/cargo_new/add_members_to_non_workspace/out/bar/Cargo.toml +++ b/tests/testsuite/cargo_new/add_members_to_non_workspace/out/bar/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bar" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_new/add_members_to_workspace_format_previous_items/out/crates/foo/Cargo.toml b/tests/testsuite/cargo_new/add_members_to_workspace_format_previous_items/out/crates/foo/Cargo.toml index d4c52492114..956aa0f1800 100644 --- a/tests/testsuite/cargo_new/add_members_to_workspace_format_previous_items/out/crates/foo/Cargo.toml +++ b/tests/testsuite/cargo_new/add_members_to_workspace_format_previous_items/out/crates/foo/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "foo" version = "0.1.0" -edition = "2021" +edition = "2024" authors.workspace = true [dependencies] diff --git a/tests/testsuite/cargo_new/add_members_to_workspace_format_sorted/out/crates/foo/Cargo.toml b/tests/testsuite/cargo_new/add_members_to_workspace_format_sorted/out/crates/foo/Cargo.toml index 878c6729147..05126080007 100644 --- a/tests/testsuite/cargo_new/add_members_to_workspace_format_sorted/out/crates/foo/Cargo.toml +++ b/tests/testsuite/cargo_new/add_members_to_workspace_format_sorted/out/crates/foo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "foo" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_new/add_members_to_workspace_with_absolute_package_path/out/crates/foo/Cargo.toml b/tests/testsuite/cargo_new/add_members_to_workspace_with_absolute_package_path/out/crates/foo/Cargo.toml index 878c6729147..05126080007 100644 --- a/tests/testsuite/cargo_new/add_members_to_workspace_with_absolute_package_path/out/crates/foo/Cargo.toml +++ b/tests/testsuite/cargo_new/add_members_to_workspace_with_absolute_package_path/out/crates/foo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "foo" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_new/add_members_to_workspace_with_empty_members/out/crates/foo/Cargo.toml b/tests/testsuite/cargo_new/add_members_to_workspace_with_empty_members/out/crates/foo/Cargo.toml index 878c6729147..05126080007 100644 --- a/tests/testsuite/cargo_new/add_members_to_workspace_with_empty_members/out/crates/foo/Cargo.toml +++ b/tests/testsuite/cargo_new/add_members_to_workspace_with_empty_members/out/crates/foo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "foo" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_new/add_members_to_workspace_with_exclude_list/out/crates/foo/Cargo.toml b/tests/testsuite/cargo_new/add_members_to_workspace_with_exclude_list/out/crates/foo/Cargo.toml index 878c6729147..05126080007 100644 --- a/tests/testsuite/cargo_new/add_members_to_workspace_with_exclude_list/out/crates/foo/Cargo.toml +++ b/tests/testsuite/cargo_new/add_members_to_workspace_with_exclude_list/out/crates/foo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "foo" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_new/add_members_to_workspace_with_members_glob/out/crates/foo/Cargo.toml b/tests/testsuite/cargo_new/add_members_to_workspace_with_members_glob/out/crates/foo/Cargo.toml index 878c6729147..05126080007 100644 --- a/tests/testsuite/cargo_new/add_members_to_workspace_with_members_glob/out/crates/foo/Cargo.toml +++ b/tests/testsuite/cargo_new/add_members_to_workspace_with_members_glob/out/crates/foo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "foo" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_new/add_members_to_workspace_without_members/out/bar/Cargo.toml b/tests/testsuite/cargo_new/add_members_to_workspace_without_members/out/bar/Cargo.toml index fe23452f35a..845311fc806 100644 --- a/tests/testsuite/cargo_new/add_members_to_workspace_without_members/out/bar/Cargo.toml +++ b/tests/testsuite/cargo_new/add_members_to_workspace_without_members/out/bar/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bar" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_new/ignore_current_dir_workspace/out/out-of-workspace/Cargo.toml b/tests/testsuite/cargo_new/ignore_current_dir_workspace/out/out-of-workspace/Cargo.toml index e0fde467294..c7dc68a9f37 100644 --- a/tests/testsuite/cargo_new/ignore_current_dir_workspace/out/out-of-workspace/Cargo.toml +++ b/tests/testsuite/cargo_new/ignore_current_dir_workspace/out/out-of-workspace/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "out-of-workspace" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_new/inherit_workspace_lints/out/crates/foo/Cargo.toml b/tests/testsuite/cargo_new/inherit_workspace_lints/out/crates/foo/Cargo.toml index 836294e0da7..e5e0f22462c 100644 --- a/tests/testsuite/cargo_new/inherit_workspace_lints/out/crates/foo/Cargo.toml +++ b/tests/testsuite/cargo_new/inherit_workspace_lints/out/crates/foo/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "foo" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/cargo_new/not_inherit_workspace_package_table_if_not_members/out/bar/Cargo.toml b/tests/testsuite/cargo_new/not_inherit_workspace_package_table_if_not_members/out/bar/Cargo.toml index fe23452f35a..845311fc806 100644 --- a/tests/testsuite/cargo_new/not_inherit_workspace_package_table_if_not_members/out/bar/Cargo.toml +++ b/tests/testsuite/cargo_new/not_inherit_workspace_package_table_if_not_members/out/bar/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bar" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] diff --git a/tests/testsuite/check.rs b/tests/testsuite/check.rs index 36f95258cab..cff23929cf6 100644 --- a/tests/testsuite/check.rs +++ b/tests/testsuite/check.rs @@ -1077,14 +1077,12 @@ fn warn_manifest_with_project() { .run(); } -#[cargo_test(nightly, reason = "edition2024")] +#[cargo_test] fn error_manifest_with_project_on_2024() { let p = project() .file( "Cargo.toml", r#" - cargo-features = ["edition2024"] - [project] name = "foo" version = "0.0.1" @@ -1095,7 +1093,6 @@ fn error_manifest_with_project_on_2024() { .build(); p.cargo("check") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_status(101) .with_stderr_data(str![[r#" [ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml` diff --git a/tests/testsuite/edition.rs b/tests/testsuite/edition.rs index 92f75b181d4..7b22c2dbda8 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/fix.rs b/tests/testsuite/fix.rs index 15fb306342c..bd47056c0dc 100644 --- a/tests/testsuite/fix.rs +++ b/tests/testsuite/fix.rs @@ -869,7 +869,7 @@ fn prepare_for_already_on_latest_unstable() { .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn prepare_for_already_on_latest_stable() { // Stable counterpart of prepare_for_already_on_latest_unstable. if Edition::LATEST_UNSTABLE.is_some() { @@ -2361,8 +2361,6 @@ fn migrate_project_to_package() { .file( "Cargo.toml", r#" -cargo-features = ["edition2024"] - # Before project [ project ] # After project header # After project header line @@ -2375,7 +2373,6 @@ edition = "2021" .build(); p.cargo("fix --edition --allow-no-vcs") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_stderr_data(str![[r#" [MIGRATING] Cargo.toml from 2021 edition to 2024 [FIXED] Cargo.toml (1 fix) @@ -2389,8 +2386,6 @@ edition = "2021" p.read_file("Cargo.toml"), str![[r#" -cargo-features = ["edition2024"] - # Before project [ package ] # After project header # After project header line @@ -2408,8 +2403,6 @@ fn migrate_removes_project() { .file( "Cargo.toml", r#" -cargo-features = ["edition2024"] - # Before package [ package ] # After package header # After package header line @@ -2429,7 +2422,6 @@ edition = "2021" .build(); p.cargo("fix --edition --allow-no-vcs") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_stderr_data(str![[r#" [MIGRATING] Cargo.toml from 2021 edition to 2024 [FIXED] Cargo.toml (1 fix) @@ -2443,8 +2435,6 @@ edition = "2021" p.read_file("Cargo.toml"), str![[r#" -cargo-features = ["edition2024"] - # Before package [ package ] # After package header # After package header line @@ -2462,8 +2452,6 @@ fn migrate_rename_underscore_fields() { .file( "Cargo.toml", r#" -cargo-features = ["edition2024"] - [workspace.dependencies] # Before default_features a = {path = "a", default_features = false} # After default_features value @@ -2531,7 +2519,6 @@ a = {path = "a", default_features = false} .build(); p.cargo("fix --edition --allow-no-vcs") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_stderr_data(str![[r#" [MIGRATING] Cargo.toml from 2021 edition to 2024 [FIXED] Cargo.toml (11 fixes) @@ -2547,8 +2534,6 @@ a = {path = "a", default_features = false} p.read_file("Cargo.toml"), str![[r#" -cargo-features = ["edition2024"] - [workspace.dependencies] # Before default_features a = {path = "a", default-features = false} # After default_features value @@ -2691,7 +2676,6 @@ dep_df_false = { version = "0.1.0", default-features = false } .build(); p.cargo("fix --all --edition --allow-no-vcs") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_stderr_data( str![[r#" [MIGRATING] pkg_default/Cargo.toml from 2021 edition to 2024 diff --git a/tests/testsuite/inheritable_workspace_fields.rs b/tests/testsuite/inheritable_workspace_fields.rs index 7ac3252eb2e..14e02aa831d 100644 --- a/tests/testsuite/inheritable_workspace_fields.rs +++ b/tests/testsuite/inheritable_workspace_fields.rs @@ -1549,7 +1549,7 @@ fn warn_inherit_def_feat_true_member_def_feat_false() { "#]]).run(); } -#[cargo_test(nightly, reason = "edition2024 is not stable")] +#[cargo_test] fn warn_inherit_def_feat_true_member_def_feat_false_2024_edition() { Package::new("dep", "0.1.0") .feature("default", &["fancy_dep"]) @@ -1563,8 +1563,6 @@ fn warn_inherit_def_feat_true_member_def_feat_false_2024_edition() { .file( "Cargo.toml", r#" - cargo-features = ["edition2024"] - [package] name = "bar" version = "0.2.0" @@ -1583,7 +1581,6 @@ fn warn_inherit_def_feat_true_member_def_feat_false_2024_edition() { .build(); p.cargo("check") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_status(101) .with_stderr_data(str![[r#" [ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml` @@ -1644,7 +1641,7 @@ fn warn_inherit_simple_member_def_feat_false() { "#]]).run(); } -#[cargo_test(nightly, reason = "edition2024 is not stable")] +#[cargo_test] fn warn_inherit_simple_member_def_feat_false_2024_edition() { Package::new("dep", "0.1.0") .feature("default", &["fancy_dep"]) @@ -1658,8 +1655,6 @@ fn warn_inherit_simple_member_def_feat_false_2024_edition() { .file( "Cargo.toml", r#" - cargo-features = ["edition2024"] - [package] name = "bar" version = "0.2.0" @@ -1678,7 +1673,6 @@ fn warn_inherit_simple_member_def_feat_false_2024_edition() { .build(); p.cargo("check") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_status(101) .with_stderr_data(str![[r#" [ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml` diff --git a/tests/testsuite/lockfile_path.rs b/tests/testsuite/lockfile_path.rs index 45fc62a23fe..b382064bf1c 100644 --- a/tests/testsuite/lockfile_path.rs +++ b/tests/testsuite/lockfile_path.rs @@ -494,7 +494,7 @@ fn install_lock_file_path_must_present() { .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn run_embed() { let lockfile_path = "mylockfile/Cargo.lock"; let invalid_lockfile = "Cargo.lock"; @@ -525,7 +525,7 @@ fn run_embed() { .arg("src/main.rs") .with_status(101) .with_stderr_data(str![[ - r#"[WARNING] `package.edition` is unspecified, defaulting to `2021` + r#"[WARNING] `package.edition` is unspecified, defaulting to `2024` [ERROR] failed to parse lock file at: [ROOT]/foo/Cargo.lock ... diff --git a/tests/testsuite/new.rs b/tests/testsuite/new.rs index f60849b562f..4c007bec168 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] @@ -407,7 +407,7 @@ fn new_with_bad_edition() { .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn lockfile_constant_during_new() { cargo_process("new foo").run(); diff --git a/tests/testsuite/publish.rs b/tests/testsuite/publish.rs index 403473ed3a3..961af6ad088 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) diff --git a/tests/testsuite/rust_version.rs b/tests/testsuite/rust_version.rs index a33a6576f4d..a007eb06066 100644 --- a/tests/testsuite/rust_version.rs +++ b/tests/testsuite/rust_version.rs @@ -515,7 +515,7 @@ higher v0.0.1 ([ROOT]/foo) .run(); } -#[cargo_test(nightly, reason = "edition2024 in rustc is unstable")] +#[cargo_test] fn resolve_edition2024() { Package::new("only-newer", "1.6.0") .rust_version("1.90.0") @@ -534,8 +534,6 @@ fn resolve_edition2024() { .file( "Cargo.toml", r#" - cargo-features = ["edition2024"] - [package] name = "foo" version = "0.0.1" @@ -553,7 +551,6 @@ fn resolve_edition2024() { // Edition2024 should resolve for MSRV p.cargo("generate-lockfile") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_stderr_data(str![[r#" [UPDATING] `dummy-registry` index [LOCKING] 2 packages to latest Rust 1.85.0 compatible versions @@ -563,7 +560,6 @@ fn resolve_edition2024() { "#]]) .run(); p.cargo("tree") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_stdout_data(str![[r#" foo v0.0.1 ([ROOT]/foo) ├── newer-and-older v1.5.0 @@ -581,10 +577,8 @@ foo v0.0.1 ([ROOT]/foo) [ADDING] only-newer v1.6.0 (requires Rust 1.90.0) "#]]) - .masquerade_as_nightly_cargo(&["edition2024"]) .run(); p.cargo("tree") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_stdout_data(str![[r#" foo v0.0.1 ([ROOT]/foo) ├── newer-and-older v1.6.0 @@ -603,10 +597,8 @@ foo v0.0.1 ([ROOT]/foo) [ADDING] only-newer v1.6.0 (requires Rust 1.90.0) "#]]) - .masquerade_as_nightly_cargo(&["edition2024"]) .run(); p.cargo("tree") - .masquerade_as_nightly_cargo(&["edition2024"]) .with_stdout_data(str![[r#" foo v0.0.1 ([ROOT]/foo) ├── newer-and-older v1.6.0 diff --git a/tests/testsuite/script.rs b/tests/testsuite/script.rs index 3adcd93f569..3c31c77f360 100644 --- a/tests/testsuite/script.rs +++ b/tests/testsuite/script.rs @@ -25,7 +25,7 @@ fn path() -> Vec { std::env::split_paths(&std::env::var_os("PATH").unwrap_or_default()).collect() } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn basic_rs() { let p = cargo_test_support::project() .file("echo.rs", ECHO_SCRIPT) @@ -39,7 +39,7 @@ args: [] "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] echo v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/echo[EXE]` @@ -48,7 +48,7 @@ args: [] .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn basic_path() { let p = cargo_test_support::project() .file("echo", ECHO_SCRIPT) @@ -62,7 +62,7 @@ args: [] "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] echo v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/echo[EXE]` @@ -94,7 +94,7 @@ fn path_required() { .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] #[cfg(unix)] fn manifest_precedence_over_plugins() { let p = cargo_test_support::project() @@ -116,7 +116,7 @@ args: [] "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] echo v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/echo[EXE]` @@ -125,7 +125,7 @@ args: [] .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] #[cfg(unix)] fn warn_when_plugin_masks_manifest_on_stable() { let p = cargo_test_support::project() @@ -182,7 +182,7 @@ fn requires_z_flag() { .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn clean_output_with_edition() { let script = r#"#!/usr/bin/env cargo --- @@ -212,7 +212,7 @@ Hello world! .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn warning_without_edition() { let script = r#"#!/usr/bin/env cargo --- @@ -233,7 +233,7 @@ Hello world! "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] script v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/script[EXE]` @@ -242,7 +242,7 @@ Hello world! .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn rebuild() { let script = r#"#!/usr/bin/env cargo-eval @@ -261,7 +261,7 @@ msg = undefined "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] script v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/script[EXE]` @@ -277,7 +277,7 @@ msg = undefined "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/script[EXE]` @@ -293,7 +293,7 @@ msg = hello "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] script v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/script[EXE]` @@ -302,7 +302,7 @@ msg = hello .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn use_cargo_home_config() { let script = ECHO_SCRIPT; let _ = cargo_test_support::project() @@ -366,7 +366,7 @@ Caused by: .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn default_programmatic_verbosity() { let script = ECHO_SCRIPT; let p = cargo_test_support::project() @@ -384,7 +384,7 @@ args: ["-NotAnArg"] .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn quiet() { let script = ECHO_SCRIPT; let p = cargo_test_support::project() @@ -402,7 +402,7 @@ args: ["-NotAnArg"] .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn test_line_numbering_preserved() { let script = r#"#!/usr/bin/env cargo @@ -421,7 +421,7 @@ line: 4 "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] script v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/script[EXE]` @@ -430,7 +430,7 @@ line: 4 .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn test_escaped_hyphen_arg() { let script = ECHO_SCRIPT; let p = cargo_test_support::project() @@ -445,7 +445,7 @@ args: ["-NotAnArg"] "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] script v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/script[EXE] -NotAnArg` @@ -454,7 +454,7 @@ args: ["-NotAnArg"] .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn test_unescaped_hyphen_arg() { let script = ECHO_SCRIPT; let p = cargo_test_support::project() @@ -469,7 +469,7 @@ args: ["-NotAnArg"] "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] script v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/script[EXE] -NotAnArg` @@ -478,7 +478,7 @@ args: ["-NotAnArg"] .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn test_same_flags() { let script = ECHO_SCRIPT; let p = cargo_test_support::project() @@ -493,7 +493,7 @@ args: ["--help"] "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] script v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/script[EXE] --help` @@ -502,7 +502,7 @@ args: ["--help"] .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn test_name_has_weird_chars() { let script = ECHO_SCRIPT; let p = cargo_test_support::project() @@ -517,7 +517,7 @@ args: [] "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] s-h-w-c- v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/s-h-w-c-[EXE]` @@ -526,7 +526,7 @@ args: [] .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn test_name_has_leading_number() { let script = ECHO_SCRIPT; let p = cargo_test_support::project() @@ -541,7 +541,7 @@ args: [] "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] answer v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/answer[EXE]` @@ -550,7 +550,7 @@ args: [] .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn test_name_is_number() { let script = ECHO_SCRIPT; let p = cargo_test_support::project().file("42.rs", script).build(); @@ -563,7 +563,7 @@ args: [] "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] package v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/package[EXE]` @@ -686,7 +686,7 @@ fn did_you_mean_command_stable() { .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn test_name_same_as_dependency() { Package::new("script", "1.0.0").publish(); let script = r#"#!/usr/bin/env cargo @@ -709,9 +709,9 @@ Hello world! "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [UPDATING] `dummy-registry` index -[LOCKING] 1 package to latest compatible version +[LOCKING] 1 package to latest Rust [..] compatible version [DOWNLOADING] crates ... [DOWNLOADED] script v1.0.0 (registry `dummy-registry`) [COMPILING] script v1.0.0 @@ -723,7 +723,7 @@ Hello world! .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn test_path_dep() { let script = r#"#!/usr/bin/env cargo --- @@ -748,8 +748,8 @@ Hello world! "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` -[LOCKING] 1 package to latest compatible version +[WARNING] `package.edition` is unspecified, defaulting to `2024` +[LOCKING] 1 package to latest Rust [..] compatible version [COMPILING] bar v0.0.1 ([ROOT]/foo/bar) [COMPILING] script v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -759,7 +759,7 @@ Hello world! .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn test_no_build_rs() { let script = r#"#!/usr/bin/env cargo @@ -778,7 +778,7 @@ Hello world! "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] script v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/script[EXE] --help` @@ -787,7 +787,7 @@ Hello world! .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn test_no_autobins() { let script = r#"#!/usr/bin/env cargo @@ -806,7 +806,7 @@ Hello world! "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] script v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/script[EXE] --help` @@ -815,7 +815,7 @@ Hello world! .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn test_no_autolib() { let script = r#"#!/usr/bin/env cargo @@ -834,7 +834,7 @@ Hello world! "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] script v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/script[EXE] --help` @@ -843,7 +843,7 @@ Hello world! .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn implicit_target_dir() { let script = ECHO_SCRIPT; let p = cargo_test_support::project() @@ -858,7 +858,7 @@ args: [] "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] script v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/script[EXE]` @@ -867,7 +867,7 @@ args: [] .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn no_local_lockfile() { let script = ECHO_SCRIPT; let p = cargo_test_support::project() @@ -885,7 +885,7 @@ args: [] "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] script v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/script[EXE]` @@ -931,7 +931,7 @@ fn cmd_check_requires_z_flag() { .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn cmd_check_with_embedded() { let script = ECHO_SCRIPT; let p = cargo_test_support::project() @@ -942,7 +942,7 @@ fn cmd_check_with_embedded() { .masquerade_as_nightly_cargo(&["script"]) .with_stdout_data("") .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [CHECKING] script v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -980,7 +980,7 @@ fn cmd_check_with_missing_script() { .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn cmd_build_with_embedded() { let script = ECHO_SCRIPT; let p = cargo_test_support::project() @@ -991,7 +991,7 @@ fn cmd_build_with_embedded() { .masquerade_as_nightly_cargo(&["script"]) .with_stdout_data("") .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] script v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -999,7 +999,7 @@ fn cmd_build_with_embedded() { .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn cmd_test_with_embedded() { let script = ECHO_SCRIPT; let p = cargo_test_support::project() @@ -1018,7 +1018,7 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; fini "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] script v0.0.0 ([ROOT]/foo) [FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] unittests script.rs ([ROOT]/home/.cargo/target/[HASH]/debug/deps/script-[HASH][EXE]) @@ -1027,7 +1027,7 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; fini .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn cmd_clean_with_embedded() { let script = ECHO_SCRIPT; let p = cargo_test_support::project() @@ -1043,7 +1043,7 @@ fn cmd_clean_with_embedded() { .masquerade_as_nightly_cargo(&["script"]) .with_stdout_data("") .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [REMOVED] [FILE_NUM] files, [FILE_SIZE]B total "#]]) @@ -1061,7 +1061,7 @@ fn cmd_generate_lockfile_with_embedded() { .masquerade_as_nightly_cargo(&["script"]) .with_stdout_data("") .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` "#]]) .run(); @@ -1088,7 +1088,7 @@ fn cmd_metadata_with_embedded() { "dependencies": [], "description": null, "documentation": null, - "edition": "2021", + "edition": "2024", "features": {}, "homepage": null, "id": "path+[ROOTURL]/foo#script@0.0.0", @@ -1111,7 +1111,7 @@ fn cmd_metadata_with_embedded() { ], "doc": true, "doctest": false, - "edition": "2021", + "edition": "2024", "kind": [ "bin" ], @@ -1148,7 +1148,7 @@ fn cmd_metadata_with_embedded() { .is_json(), ) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` "#]]) .run(); @@ -1172,7 +1172,7 @@ fn cmd_read_manifest_with_embedded() { "dependencies": [], "description": null, "documentation": null, - "edition": "2021", + "edition": "2024", "features": {}, "homepage": null, "id": "path+[ROOTURL]/foo#script@0.0.0", @@ -1195,7 +1195,7 @@ fn cmd_read_manifest_with_embedded() { ], "doc": true, "doctest": false, - "edition": "2021", + "edition": "2024", "kind": [ "bin" ], @@ -1210,13 +1210,13 @@ fn cmd_read_manifest_with_embedded() { .is_json(), ) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` "#]]) .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn cmd_run_with_embedded() { let p = cargo_test_support::project() .file("script.rs", ECHO_SCRIPT) @@ -1230,7 +1230,7 @@ args: [] "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] script v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/script[EXE]` @@ -1252,7 +1252,7 @@ script v0.0.0 ([ROOT]/foo) "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` "#]]) .run(); @@ -1268,7 +1268,7 @@ fn cmd_update_with_embedded() { .masquerade_as_nightly_cargo(&["script"]) .with_stdout_data("") .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` "#]]) .run(); @@ -1291,7 +1291,7 @@ fn cmd_verify_project_with_embedded() { .is_json(), ) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` "#]]) .run(); @@ -1307,7 +1307,7 @@ fn cmd_pkgid_with_embedded() { .masquerade_as_nightly_cargo(&["script"]) .with_status(101) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [ERROR] [ROOT]/foo/script.rs is unsupported by `cargo pkgid` "#]]) @@ -1324,7 +1324,7 @@ fn cmd_package_with_embedded() { .masquerade_as_nightly_cargo(&["script"]) .with_status(101) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [ERROR] [ROOT]/foo/script.rs is unsupported by `cargo package` "#]]) @@ -1341,14 +1341,14 @@ fn cmd_publish_with_embedded() { .masquerade_as_nightly_cargo(&["script"]) .with_status(101) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [ERROR] [ROOT]/foo/script.rs is unsupported by `cargo publish` "#]]) .run(); } -#[cargo_test] +#[cargo_test(nightly, reason = "edition2024 hasn't hit stable yet")] fn manifest_path_env() { let p = cargo_test_support::project() .file( @@ -1369,7 +1369,7 @@ CARGO_MANIFEST_PATH: [ROOT]/foo/script.rs "#]]) .with_stderr_data(str![[r#" -[WARNING] `package.edition` is unspecified, defaulting to `2021` +[WARNING] `package.edition` is unspecified, defaulting to `2024` [COMPILING] script v0.0.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `[ROOT]/home/.cargo/target/[HASH]/debug/script[EXE]`