Skip to content

Commit cb86148

Browse files
committed
Fix example which wrongly implied that the upper bound of edition ranges was inclusive
And explicitly state the fact that the upper bound is exclusive since only giving an example is too implicit.
1 parent 61ad195 commit cb86148

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tests/directives.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,9 @@ This affects which edition is used by `./x test` to run the test.
273273
For example:
274274

275275
- A test with the `//@ edition: 2018` directive will only run under the 2018 edition.
276-
- A test with the `//@ edition: 2015..2021` directive can be run under the 2015, 2018, and 2021 editions.
276+
- A test with the `//@ edition: 2015..2021` directive can be run under the 2015 and the 2018 edition,
277+
so the upper bound is exclusive just like in Rust
278+
(note that there's no equivalent to Rust's `..=` where the upper bound is inclusive).
277279
However, CI will only run the test with the lowest edition in the range (which is 2015 in this example).
278280
- A test with the `//@ edition: 2018..` directive will run under 2018 edition or greater.
279281
However, CI will only run the test with the lowest edition in the range (which is 2018 in this example).

0 commit comments

Comments
 (0)