Skip to content

Commit b56d514

Browse files
committed
Destabilize 2018 edition
This reverts commit 4d1ec81.
1 parent 8b5dc95 commit b56d514

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

src/doc/rustdoc/src/command-line-arguments.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -345,17 +345,3 @@ $ rustdoc src/lib.rs --sysroot /path/to/sysroot
345345

346346
Similar to `rustc --sysroot`, this lets you change the sysroot `rustdoc` uses
347347
when compiling your code.
348-
349-
### `--edition`: control the edition of docs and doctests
350-
351-
Using this flag looks like this:
352-
353-
```bash
354-
$ rustdoc src/lib.rs --edition 2018
355-
$ rustdoc --test src/lib.rs --edition 2018
356-
```
357-
358-
This flag allows rustdoc to treat your rust code as the given edition. It will compile doctests with
359-
the given edition as well. As with `rustc`, the default edition that `rustdoc` will use is `2015`
360-
(the first edition).
361-

src/doc/rustdoc/src/unstable-features.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,19 @@ details.
346346

347347
[issue-display-warnings]: https://github.com/rust-lang/rust/issues/41574
348348

349+
### `--edition`: control the edition of docs and doctests
350+
351+
Using this flag looks like this:
352+
353+
```bash
354+
$ rustdoc src/lib.rs -Z unstable-options --edition 2018
355+
$ rustdoc --test src/lib.rs -Z unstable-options --edition 2018
356+
```
357+
358+
This flag allows rustdoc to treat your rust code as the given edition. It will compile doctests with
359+
the given edition as well. As with `rustc`, the default edition that `rustdoc` will use is `2015`
360+
(the first edition).
361+
349362
### `--extern-html-root-url`: control how rustdoc links to non-local crates
350363

351364
Using this flag looks like this:

src/librustdoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ fn opts() -> Vec<RustcOptGroup> {
286286
\"light-suffix.css\"",
287287
"PATH")
288288
}),
289-
stable("edition", |o| {
289+
unstable("edition", |o| {
290290
o.optopt("", "edition",
291291
"edition to use when compiling rust code (default: 2015)",
292292
"EDITION")

src/libsyntax_pos/edition.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl Edition {
6565
pub fn is_stable(&self) -> bool {
6666
match *self {
6767
Edition::Edition2015 => true,
68-
Edition::Edition2018 => true,
68+
Edition::Edition2018 => false,
6969
}
7070
}
7171
}

0 commit comments

Comments
 (0)