]> git.lizzy.rs Git - rust.git/commitdiff
Stabilize the 2018 edition
authorMark Rousskov <mark.simulacrum@gmail.com>
Thu, 6 Sep 2018 16:20:01 +0000 (10:20 -0600)
committerMatthias Krüger <matthias.krueger@famsik.de>
Sun, 9 Sep 2018 00:28:13 +0000 (02:28 +0200)
src/doc/rustdoc/src/command-line-arguments.md
src/doc/rustdoc/src/unstable-features.md
src/librustdoc/lib.rs
src/libsyntax_pos/edition.rs

index 417608cc5ca0a3e57f76c4cde1c28bc0addfabc3..aba485f752ab2bd9b706a1a9739d32bfd2ae1d5c 100644 (file)
@@ -345,3 +345,17 @@ $ 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).
+
index 32fb8c2f7d58e4f9330946fef58512f133d37076..071575b1fc094e7c48de83422ed53e7c6497e165 100644 (file)
@@ -346,19 +346,6 @@ 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:
index 1acae86f0068f5f7ba61180eac9d9717791690ca..3211607807ff3c98bdcf1d84d105477e02a0a943 100644 (file)
@@ -286,7 +286,7 @@ fn opts() -> Vec<RustcOptGroup> {
                       \"light-suffix.css\"",
                      "PATH")
         }),
-        unstable("edition", |o| {
+        stable("edition", |o| {
             o.optopt("", "edition",
                      "edition to use when compiling rust code (default: 2015)",
                      "EDITION")
index fce8fc3db4e4ed0f55f8ed867f8b6c4f4f541a18..7709db72a02fb4c0f11790987f5ac0981b10dec1 100644 (file)
@@ -65,7 +65,7 @@ pub fn feature_name(&self) -> &'static str {
     pub fn is_stable(&self) -> bool {
         match *self {
             Edition::Edition2015 => true,
-            Edition::Edition2018 => false,
+            Edition::Edition2018 => true,
         }
     }
 }