diff --git a/compiler/rustc_span/src/edition.rs b/compiler/rustc_span/src/edition.rs
index fe09daf522c1c..36f9b4cff60b0 100644
--- a/compiler/rustc_span/src/edition.rs
+++ b/compiler/rustc_span/src/edition.rs
@@ -33,7 +33,7 @@ pub const EDITION_NAME_LIST: &str = "2015|2018|2021|2024";
pub const DEFAULT_EDITION: Edition = Edition::Edition2015;
-pub const LATEST_STABLE_EDITION: Edition = Edition::Edition2021;
+pub const LATEST_STABLE_EDITION: Edition = Edition::Edition2024;
impl fmt::Display for Edition {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
@@ -62,7 +62,7 @@ impl Edition {
Edition::Edition2015 => true,
Edition::Edition2018 => true,
Edition::Edition2021 => true,
- Edition::Edition2024 => false,
+ Edition::Edition2024 => true,
}
}
diff --git a/src/doc/rustc/src/command-line-arguments.md b/src/doc/rustc/src/command-line-arguments.md
index f38d34fccd492..0942b5ebfee37 100644
--- a/src/doc/rustc/src/command-line-arguments.md
+++ b/src/doc/rustc/src/command-line-arguments.md
@@ -179,7 +179,7 @@ This informs `rustc` of the name of your crate.
## `--edition`: specify the edition to use
-This flag takes a value of `2015`, `2018` or `2021`. The default is `2015`. More
+This flag takes a value of `2015`, `2018`,`2021`, or `2024`. The default is `2015`. More
information about editions may be found in the [edition guide].
[edition guide]: ../edition-guide/introduction.html
diff --git a/src/doc/rustdoc/src/write-documentation/documentation-tests.md b/src/doc/rustdoc/src/write-documentation/documentation-tests.md
index c93893b5ada84..e02c26bd42bd6 100644
--- a/src/doc/rustdoc/src/write-documentation/documentation-tests.md
+++ b/src/doc/rustdoc/src/write-documentation/documentation-tests.md
@@ -360,7 +360,7 @@ are added.
# fn foo() {}
```
-`edition2015`, `edition2018` and `edition2021` tell `rustdoc`
+`edition2015`, `edition2018`, `edition2021`, and `edition2024` tell `rustdoc`
that the code sample should be compiled using the respective edition of Rust.
```rust
diff --git a/tests/crashes/124751.rs b/tests/crashes/124751.rs
index f15e39965d3ed..1372b97233d37 100644
--- a/tests/crashes/124751.rs
+++ b/tests/crashes/124751.rs
@@ -1,5 +1,5 @@
//@ known-bug: rust-lang/rust#124751
-//@ compile-flags: -Zunstable-options --edition=2024
+//@ edition: 2024
#![feature(gen_blocks)]
diff --git a/tests/run-make/rustc-help/help-v.stdout b/tests/run-make/rustc-help/help-v.stdout
index dbd67b57df2f0..8f6fde69c29b1 100644
--- a/tests/run-make/rustc-help/help-v.stdout
+++ b/tests/run-make/rustc-help/help-v.stdout
@@ -25,7 +25,7 @@ Options:
--edition 2015|2018|2021|2024
Specify which edition of the compiler to use when
compiling code. The default is 2015 and the latest
- stable edition is 2021.
+ stable edition is 2024.
--emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]
Comma separated list of types of output for the
compiler to emit
diff --git a/tests/run-make/rustc-help/help.stdout b/tests/run-make/rustc-help/help.stdout
index a7d07162799b0..131efa93282fd 100644
--- a/tests/run-make/rustc-help/help.stdout
+++ b/tests/run-make/rustc-help/help.stdout
@@ -25,7 +25,7 @@ Options:
--edition 2015|2018|2021|2024
Specify which edition of the compiler to use when
compiling code. The default is 2015 and the latest
- stable edition is 2021.
+ stable edition is 2024.
--emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]
Comma separated list of types of output for the
compiler to emit
diff --git a/tests/rustdoc-ui/2024-doctests-checks.rs b/tests/rustdoc-ui/2024-doctests-checks.rs
index 464cf5b200df0..f3e4e10f57149 100644
--- a/tests/rustdoc-ui/2024-doctests-checks.rs
+++ b/tests/rustdoc-ui/2024-doctests-checks.rs
@@ -1,5 +1,6 @@
//@ check-pass
-//@ compile-flags: --test --test-args=--test-threads=1 -Zunstable-options --edition 2024
+//@ edition: 2024
+//@ compile-flags: --test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
diff --git a/tests/rustdoc-ui/2024-doctests-checks.stdout b/tests/rustdoc-ui/2024-doctests-checks.stdout
index d1064084a8564..534fe466fe701 100644
--- a/tests/rustdoc-ui/2024-doctests-checks.stdout
+++ b/tests/rustdoc-ui/2024-doctests-checks.stdout
@@ -1,12 +1,12 @@
running 1 test
-test $DIR/2024-doctests-checks.rs - Foo (line 7) ... ok
+test $DIR/2024-doctests-checks.rs - Foo (line 8) ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
running 1 test
-test $DIR/2024-doctests-checks.rs - Foo (line 14) ... ok
+test $DIR/2024-doctests-checks.rs - Foo (line 15) ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
diff --git a/tests/rustdoc-ui/2024-doctests-crate-attribute.rs b/tests/rustdoc-ui/2024-doctests-crate-attribute.rs
index 4984fdfe1949a..a353fc7cc445b 100644
--- a/tests/rustdoc-ui/2024-doctests-crate-attribute.rs
+++ b/tests/rustdoc-ui/2024-doctests-crate-attribute.rs
@@ -1,5 +1,6 @@
//@ check-pass
-//@ compile-flags: --test --test-args=--test-threads=1 -Zunstable-options --edition 2024
+//@ edition: 2024
+//@ compile-flags: --test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
diff --git a/tests/rustdoc-ui/2024-doctests-crate-attribute.stdout b/tests/rustdoc-ui/2024-doctests-crate-attribute.stdout
index 29702ce8929bd..c084ac4522e8a 100644
--- a/tests/rustdoc-ui/2024-doctests-crate-attribute.stdout
+++ b/tests/rustdoc-ui/2024-doctests-crate-attribute.stdout
@@ -1,12 +1,12 @@
running 1 test
-test $DIR/2024-doctests-crate-attribute.rs - Foo (line 19) ... ok
+test $DIR/2024-doctests-crate-attribute.rs - Foo (line 20) ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
running 1 test
-test $DIR/2024-doctests-crate-attribute.rs - Foo (line 10) ... ok
+test $DIR/2024-doctests-crate-attribute.rs - Foo (line 11) ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
diff --git a/tests/rustdoc-ui/doctest/auxiliary/extern_macros_2024.rs b/tests/rustdoc-ui/doctest/auxiliary/extern_macros_2024.rs
index 354427000bf71..388b8f310ae39 100644
--- a/tests/rustdoc-ui/doctest/auxiliary/extern_macros_2024.rs
+++ b/tests/rustdoc-ui/doctest/auxiliary/extern_macros_2024.rs
@@ -1,5 +1,4 @@
//@ edition:2024
-//@ compile-flags:-Z unstable-options
#![crate_name="extern_macros"]
#[macro_export]
macro_rules! attrs_on_struct {
diff --git a/tests/rustdoc-ui/doctest/dead-code-2024.rs b/tests/rustdoc-ui/doctest/dead-code-2024.rs
index 4c77112e61a6b..41459c5e6512d 100644
--- a/tests/rustdoc-ui/doctest/dead-code-2024.rs
+++ b/tests/rustdoc-ui/doctest/dead-code-2024.rs
@@ -1,6 +1,7 @@
// This test ensures that the 2024 edition merged doctest will not use `#[allow(unused)]`.
-//@ compile-flags:--test -Zunstable-options --edition 2024
+//@ edition: 2024
+//@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101
diff --git a/tests/rustdoc-ui/doctest/dead-code-2024.stdout b/tests/rustdoc-ui/doctest/dead-code-2024.stdout
index 69dd4e2ede1ac..a943a177e10b6 100644
--- a/tests/rustdoc-ui/doctest/dead-code-2024.stdout
+++ b/tests/rustdoc-ui/doctest/dead-code-2024.stdout
@@ -1,18 +1,18 @@
running 1 test
-test $DIR/dead-code-2024.rs - f (line 12) - compile ... FAILED
+test $DIR/dead-code-2024.rs - f (line 13) - compile ... FAILED
failures:
----- $DIR/dead-code-2024.rs - f (line 12) stdout ----
+---- $DIR/dead-code-2024.rs - f (line 13) stdout ----
error: trait `T` is never used
- --> $DIR/dead-code-2024.rs:13:7
+ --> $DIR/dead-code-2024.rs:14:7
|
LL | trait T { fn f(); }
| ^
|
note: the lint level is defined here
- --> $DIR/dead-code-2024.rs:11:9
+ --> $DIR/dead-code-2024.rs:12:9
|
LL | #![deny(warnings)]
| ^^^^^^^^
@@ -23,7 +23,7 @@ error: aborting due to 1 previous error
Couldn't compile the test.
failures:
- $DIR/dead-code-2024.rs - f (line 12)
+ $DIR/dead-code-2024.rs - f (line 13)
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
diff --git a/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs
index 4018e37105ff1..d057218688c48 100644
--- a/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs
+++ b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs
@@ -1,7 +1,8 @@
// FIXME: if/when the output of the test harness can be tested on its own, this test should be
// adapted to use that, and that normalize line can go away
-//@ compile-flags:--test -Z unstable-options --edition 2024
+//@ edition: 2024
+//@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101
diff --git a/tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout
index cb3456e087ebe..90c0463d832e1 100644
--- a/tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout
@@ -1,14 +1,14 @@
running 1 test
-test $DIR/failed-doctest-should-panic.rs - Foo (line 9) - should panic ... FAILED
+test $DIR/failed-doctest-should-panic.rs - Foo (line 10) - should panic ... FAILED
failures:
----- $DIR/failed-doctest-should-panic.rs - Foo (line 9) stdout ----
+---- $DIR/failed-doctest-should-panic.rs - Foo (line 10) stdout ----
note: test did not panic as expected
failures:
- $DIR/failed-doctest-should-panic.rs - Foo (line 9)
+ $DIR/failed-doctest-should-panic.rs - Foo (line 10)
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
diff --git a/tests/rustdoc-ui/doctest/merged-ignore-no_run.rs b/tests/rustdoc-ui/doctest/merged-ignore-no_run.rs
index 4c21d54295106..754791361e8bf 100644
--- a/tests/rustdoc-ui/doctest/merged-ignore-no_run.rs
+++ b/tests/rustdoc-ui/doctest/merged-ignore-no_run.rs
@@ -1,4 +1,5 @@
-//@ compile-flags:--test --test-args=--test-threads=1 -Zunstable-options --edition 2024
+//@ edition: 2024
+//@ compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass
diff --git a/tests/rustdoc-ui/doctest/merged-ignore-no_run.stdout b/tests/rustdoc-ui/doctest/merged-ignore-no_run.stdout
index f2cb1e7e72f70..a32da0aeb9649 100644
--- a/tests/rustdoc-ui/doctest/merged-ignore-no_run.stdout
+++ b/tests/rustdoc-ui/doctest/merged-ignore-no_run.stdout
@@ -1,7 +1,7 @@
running 2 tests
-test $DIR/merged-ignore-no_run.rs - ignored (line 6) ... ignored
-test $DIR/merged-ignore-no_run.rs - no_run (line 11) - compile ... ok
+test $DIR/merged-ignore-no_run.rs - ignored (line 7) ... ignored
+test $DIR/merged-ignore-no_run.rs - no_run (line 12) - compile ... ok
test result: ok. 1 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in $TIME
diff --git a/tests/rustdoc-ui/doctest/standalone-warning-2024.rs b/tests/rustdoc-ui/doctest/standalone-warning-2024.rs
index aac4303154697..35d1c738bb16f 100644
--- a/tests/rustdoc-ui/doctest/standalone-warning-2024.rs
+++ b/tests/rustdoc-ui/doctest/standalone-warning-2024.rs
@@ -1,6 +1,7 @@
// This test checks that it will output warnings for usage of `standalone` or `standalone_crate`.
-//@ compile-flags:--test -Zunstable-options --edition 2024
+//@ edition: 2024
+//@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
diff --git a/tests/rustdoc-ui/doctest/standalone-warning-2024.stderr b/tests/rustdoc-ui/doctest/standalone-warning-2024.stderr
index d69d03d8657c1..bfc1e91940453 100644
--- a/tests/rustdoc-ui/doctest/standalone-warning-2024.stderr
+++ b/tests/rustdoc-ui/doctest/standalone-warning-2024.stderr
@@ -1,34 +1,34 @@
error: unknown attribute `standalone`
- --> $DIR/standalone-warning-2024.rs:10:1
+ --> $DIR/standalone-warning-2024.rs:11:1
|
-10 | / //! ```standalone
-11 | | //! bla
-12 | | //! ```
-13 | | //!
-14 | | //! ```standalone-crate
-15 | | //! bla
-16 | | //! ```
+11 | / //! ```standalone
+12 | | //! bla
+13 | | //! ```
+14 | | //!
+15 | | //! ```standalone-crate
+16 | | //! bla
+17 | | //! ```
| |_______^
|
= help: use `standalone_crate` to compile this code block separately
= help: this code block may be skipped during testing, because unknown attributes are treated as markers for code samples written in other programming languages, unless it is also explicitly marked as `rust`
note: the lint level is defined here
- --> $DIR/standalone-warning-2024.rs:8:9
+ --> $DIR/standalone-warning-2024.rs:9:9
|
-8 | #![deny(warnings)]
+9 | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(rustdoc::invalid_codeblock_attributes)]` implied by `#[deny(warnings)]`
error: unknown attribute `standalone-crate`
- --> $DIR/standalone-warning-2024.rs:10:1
+ --> $DIR/standalone-warning-2024.rs:11:1
|
-10 | / //! ```standalone
-11 | | //! bla
-12 | | //! ```
-13 | | //!
-14 | | //! ```standalone-crate
-15 | | //! bla
-16 | | //! ```
+11 | / //! ```standalone
+12 | | //! bla
+13 | | //! ```
+14 | | //!
+15 | | //! ```standalone-crate
+16 | | //! bla
+17 | | //! ```
| |_______^
|
= help: use `standalone_crate` to compile this code block separately
diff --git a/tests/rustdoc-ui/doctest/wrong-ast-2024.rs b/tests/rustdoc-ui/doctest/wrong-ast-2024.rs
index 7b4fa8fd2c9b9..a1455c01bc69d 100644
--- a/tests/rustdoc-ui/doctest/wrong-ast-2024.rs
+++ b/tests/rustdoc-ui/doctest/wrong-ast-2024.rs
@@ -1,4 +1,5 @@
-//@ compile-flags:--test --test-args=--test-threads=1 -Zunstable-options --edition 2024
+//@ edition: 2024
+//@ compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
diff --git a/tests/rustdoc-ui/doctest/wrong-ast-2024.stdout b/tests/rustdoc-ui/doctest/wrong-ast-2024.stdout
index 22c8ce468fd7c..62e1fb10b9f4a 100644
--- a/tests/rustdoc-ui/doctest/wrong-ast-2024.stdout
+++ b/tests/rustdoc-ui/doctest/wrong-ast-2024.stdout
@@ -1,17 +1,17 @@
running 1 test
-test $DIR/wrong-ast-2024.rs - three (line 17) - should panic ... ok
+test $DIR/wrong-ast-2024.rs - three (line 18) - should panic ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
running 2 tests
-test $DIR/wrong-ast-2024.rs - one (line 7) ... FAILED
-test $DIR/wrong-ast-2024.rs - two (line 12) ... FAILED
+test $DIR/wrong-ast-2024.rs - one (line 8) ... FAILED
+test $DIR/wrong-ast-2024.rs - two (line 13) ... FAILED
failures:
----- $DIR/wrong-ast-2024.rs - one (line 7) stdout ----
+---- $DIR/wrong-ast-2024.rs - one (line 8) stdout ----
error[E0758]: unterminated block comment
--> $DIR/wrong-ast-2024.rs:$LINE:$COL
|
@@ -22,7 +22,7 @@ error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0758`.
Couldn't compile the test.
----- $DIR/wrong-ast-2024.rs - two (line 12) stdout ----
+---- $DIR/wrong-ast-2024.rs - two (line 13) stdout ----
error: unexpected closing delimiter: `}`
--> $DIR/wrong-ast-2024.rs:$LINE:$COL
|
@@ -34,8 +34,8 @@ error: aborting due to 1 previous error
Couldn't compile the test.
failures:
- $DIR/wrong-ast-2024.rs - one (line 7)
- $DIR/wrong-ast-2024.rs - two (line 12)
+ $DIR/wrong-ast-2024.rs - one (line 8)
+ $DIR/wrong-ast-2024.rs - two (line 13)
test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
diff --git a/tests/ui/async-await/async-fn/edition-2015.stderr b/tests/ui/async-await/async-fn/edition-2015.stderr
index 25101cb65df51..9fbceafd75d7a 100644
--- a/tests/ui/async-await/async-fn/edition-2015.stderr
+++ b/tests/ui/async-await/async-fn/edition-2015.stderr
@@ -4,7 +4,7 @@ error: `async` trait bounds are only allowed in Rust 2018 or later
LL | fn foo(x: impl async Fn()) -> impl async Fn() { x }
| ^^^^^
|
- = help: pass `--edition 2021` to `rustc`
+ = help: pass `--edition 2024` to `rustc`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error: `async` trait bounds are only allowed in Rust 2018 or later
@@ -13,7 +13,7 @@ error: `async` trait bounds are only allowed in Rust 2018 or later
LL | fn foo(x: impl async Fn()) -> impl async Fn() { x }
| ^^^^^
|
- = help: pass `--edition 2021` to `rustc`
+ = help: pass `--edition 2024` to `rustc`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error[E0658]: async closures are unstable
diff --git a/tests/ui/async-await/edition-deny-async-fns-2015.stderr b/tests/ui/async-await/edition-deny-async-fns-2015.stderr
index c40cdc5acec12..f39ec033e7068 100644
--- a/tests/ui/async-await/edition-deny-async-fns-2015.stderr
+++ b/tests/ui/async-await/edition-deny-async-fns-2015.stderr
@@ -4,7 +4,7 @@ error[E0670]: `async fn` is not permitted in Rust 2015
LL | async fn foo() {}
| ^^^^^ to use `async fn`, switch to Rust 2018 or later
|
- = help: pass `--edition 2021` to `rustc`
+ = help: pass `--edition 2024` to `rustc`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error[E0670]: `async fn` is not permitted in Rust 2015
@@ -13,7 +13,7 @@ error[E0670]: `async fn` is not permitted in Rust 2015
LL | fn baz() { async fn foo() {} }
| ^^^^^ to use `async fn`, switch to Rust 2018 or later
|
- = help: pass `--edition 2021` to `rustc`
+ = help: pass `--edition 2024` to `rustc`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error[E0670]: `async fn` is not permitted in Rust 2015
@@ -22,7 +22,7 @@ error[E0670]: `async fn` is not permitted in Rust 2015
LL | async fn async_baz() {
| ^^^^^ to use `async fn`, switch to Rust 2018 or later
|
- = help: pass `--edition 2021` to `rustc`
+ = help: pass `--edition 2024` to `rustc`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error[E0670]: `async fn` is not permitted in Rust 2015
@@ -31,7 +31,7 @@ error[E0670]: `async fn` is not permitted in Rust 2015
LL | async fn bar() {}
| ^^^^^ to use `async fn`, switch to Rust 2018 or later
|
- = help: pass `--edition 2021` to `rustc`
+ = help: pass `--edition 2024` to `rustc`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error[E0670]: `async fn` is not permitted in Rust 2015
@@ -40,7 +40,7 @@ error[E0670]: `async fn` is not permitted in Rust 2015
LL | async fn foo() {}
| ^^^^^ to use `async fn`, switch to Rust 2018 or later
|
- = help: pass `--edition 2021` to `rustc`
+ = help: pass `--edition 2024` to `rustc`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error[E0670]: `async fn` is not permitted in Rust 2015
@@ -49,7 +49,7 @@ error[E0670]: `async fn` is not permitted in Rust 2015
LL | async fn foo() {}
| ^^^^^ to use `async fn`, switch to Rust 2018 or later
|
- = help: pass `--edition 2021` to `rustc`
+ = help: pass `--edition 2024` to `rustc`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error[E0670]: `async fn` is not permitted in Rust 2015
@@ -58,7 +58,7 @@ error[E0670]: `async fn` is not permitted in Rust 2015
LL | async fn bar() {}
| ^^^^^ to use `async fn`, switch to Rust 2018 or later
|
- = help: pass `--edition 2021` to `rustc`
+ = help: pass `--edition 2024` to `rustc`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error[E0670]: `async fn` is not permitted in Rust 2015
@@ -67,7 +67,7 @@ error[E0670]: `async fn` is not permitted in Rust 2015
LL | async fn foo() {}
| ^^^^^ to use `async fn`, switch to Rust 2018 or later
|
- = help: pass `--edition 2021` to `rustc`
+ = help: pass `--edition 2024` to `rustc`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error[E0670]: `async fn` is not permitted in Rust 2015
@@ -76,7 +76,7 @@ error[E0670]: `async fn` is not permitted in Rust 2015
LL | async fn bar() {}
| ^^^^^ to use `async fn`, switch to Rust 2018 or later
|
- = help: pass `--edition 2021` to `rustc`
+ = help: pass `--edition 2024` to `rustc`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error: aborting due to 9 previous errors
diff --git a/tests/ui/async-await/for-await-passthrough.rs b/tests/ui/async-await/for-await-passthrough.rs
index b4fba6b2f7653..1918e2f61aa81 100644
--- a/tests/ui/async-await/for-await-passthrough.rs
+++ b/tests/ui/async-await/for-await-passthrough.rs
@@ -1,6 +1,5 @@
//@ run-pass
//@ edition: 2024
-//@ compile-flags: -Zunstable-options
#![feature(async_iterator, async_iter_from_iter, async_for_loop, noop_waker,
gen_blocks)]
diff --git a/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs b/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs
index e1fae0f0e9343..bcb5cb94b77c8 100644
--- a/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs
+++ b/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs
@@ -12,7 +12,7 @@ fn await_on_struct_missing() {
//~^ ERROR no field `await` on type
//~| NOTE unknown field
//~| NOTE to `.await` a `Future`, switch to Rust 2018
- //~| HELP set `edition = "2021"` in `Cargo.toml`
+ //~| HELP set `edition = "2024"` in `Cargo.toml`
//~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
}
@@ -26,7 +26,7 @@ fn await_on_struct_similar() {
//~| NOTE unknown field
//~| HELP a field with a similar name exists
//~| NOTE to `.await` a `Future`, switch to Rust 2018
- //~| HELP set `edition = "2021"` in `Cargo.toml`
+ //~| HELP set `edition = "2024"` in `Cargo.toml`
//~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
}
@@ -35,7 +35,7 @@ fn await_on_63533(x: Pin<&mut dyn Future