about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2018-10-24 15:21:10 +0200
committerPietro Albini <pietro@pietroalbini.org>2018-10-24 15:21:10 +0200
commitb56d5141cedba93c4d556cff593144c049ce9ca3 (patch)
treecec02d43d315105a3517fc3b11d2b714ee885231
parent8b5dc95d5746a10966c2dd777fb50bcc8b8fe72f (diff)
downloadrust-b56d5141cedba93c4d556cff593144c049ce9ca3.tar.gz
rust-b56d5141cedba93c4d556cff593144c049ce9ca3.zip
Destabilize 2018 edition
This reverts commit 4d1ec818118c6c5dac5af19b291b9601ef98c17e.
-rw-r--r--src/doc/rustdoc/src/command-line-arguments.md14
-rw-r--r--src/doc/rustdoc/src/unstable-features.md13
-rw-r--r--src/librustdoc/lib.rs2
-rw-r--r--src/libsyntax_pos/edition.rs2
4 files changed, 15 insertions, 16 deletions
diff --git a/src/doc/rustdoc/src/command-line-arguments.md b/src/doc/rustdoc/src/command-line-arguments.md
index aba485f752a..417608cc5ca 100644
--- a/src/doc/rustdoc/src/command-line-arguments.md
+++ b/src/doc/rustdoc/src/command-line-arguments.md
@@ -345,17 +345,3 @@ $ rustdoc src/lib.rs --sysroot /path/to/sysroot
 
 Similar to `rustc --sysroot`, this lets you change the sysroot `rustdoc` uses
 when compiling your code.
-
-### `--edition`: control the edition of docs and doctests
-
-Using this flag looks like this:
-
-```bash
-$ rustdoc src/lib.rs --edition 2018
-$ rustdoc --test src/lib.rs --edition 2018
-```
-
-This flag allows rustdoc to treat your rust code as the given edition. It will compile doctests with
-the given edition as well. As with `rustc`, the default edition that `rustdoc` will use is `2015`
-(the first edition).
-
diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md
index 071575b1fc0..32fb8c2f7d5 100644
--- a/src/doc/rustdoc/src/unstable-features.md
+++ b/src/doc/rustdoc/src/unstable-features.md
@@ -346,6 +346,19 @@ details.
 
 [issue-display-warnings]: https://github.com/rust-lang/rust/issues/41574
 
+### `--edition`: control the edition of docs and doctests
+
+Using this flag looks like this:
+
+```bash
+$ rustdoc src/lib.rs -Z unstable-options --edition 2018
+$ rustdoc --test src/lib.rs -Z unstable-options --edition 2018
+```
+
+This flag allows rustdoc to treat your rust code as the given edition. It will compile doctests with
+the given edition as well. As with `rustc`, the default edition that `rustdoc` will use is `2015`
+(the first edition).
+
 ### `--extern-html-root-url`: control how rustdoc links to non-local crates
 
 Using this flag looks like this:
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index e9fac23b767..3a70c55e173 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -286,7 +286,7 @@ fn opts() -> Vec<RustcOptGroup> {
                       \"light-suffix.css\"",
                      "PATH")
         }),
-        stable("edition", |o| {
+        unstable("edition", |o| {
             o.optopt("", "edition",
                      "edition to use when compiling rust code (default: 2015)",
                      "EDITION")
diff --git a/src/libsyntax_pos/edition.rs b/src/libsyntax_pos/edition.rs
index 7709db72a02..fce8fc3db4e 100644
--- a/src/libsyntax_pos/edition.rs
+++ b/src/libsyntax_pos/edition.rs
@@ -65,7 +65,7 @@ impl Edition {
     pub fn is_stable(&self) -> bool {
         match *self {
             Edition::Edition2015 => true,
-            Edition::Edition2018 => true,
+            Edition::Edition2018 => false,
         }
     }
 }