From 44ed278c40ada14e2c21dba772e0745f4d6079ce Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Sun, 21 Sep 2025 16:56:04 -0500 Subject: [PATCH 1/2] Document range syntax on the rustc dev guide --- src/tests/directives.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/tests/directives.md b/src/tests/directives.md index 4be78fac4..3b6c89174 100644 --- a/src/tests/directives.md +++ b/src/tests/directives.md @@ -262,6 +262,20 @@ Consider writing the test as a proper incremental test instead. +#### The edition directive + +The `//@ edition` directive can take an exact edition, a bounded half-open range of editions or a left-bounded half-open range of editions, this affects which edition is used by `./x test` to run the test. For example: + +- A test with the `//@ edition: 2018` directive will only run under the 2018 edition. +- A test with the `//@ edition: 2015..2021` directive can be run under both the 2015 and 2018 editions. However, CI will only run the test with the lowest edition possible (2015 in this case). +- A test with the `//@ edition: 2018..` directive will run under any edition greater or equal than 2018. However, CI will only run the test with the lowest edition possible (2018 in this case). + +You can also force `./x test` to use a specific edition by passing the `-- --edition=` argument. However, tests with the `//@ edition` directive will clamp the value passed to the argument. For example, if we run `./x test -- --edition=2015`: + +- A test with the `//@ edition: 2018` will run with the 2018 edition. +- A test with the `//@ edition: 2015..2021` will be run with the 2015 edition. +- A test with the `//@ edition: 2018..` will run with the 2018 edition. + ### Rustdoc | Directive | Explanation | Supported test suites | Possible values | From ebcfb43e089783025f56aee47fbbcf0531d1b0b4 Mon Sep 17 00:00:00 2001 From: The rustc-josh-sync Cronjob Bot Date: Mon, 6 Oct 2025 04:13:15 +0000 Subject: [PATCH 2/2] Prepare for merging from rust-lang/rust This updates the rust-version file to 4fa824bb78318a3cba8c7339d5754b4909922547. --- rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-version b/rust-version index 0dc9ce843..47552aee0 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -9f32ccf35fb877270bc44a86a126440f04d676d0 +4fa824bb78318a3cba8c7339d5754b4909922547