File tree 4 files changed +16
-15
lines changed
4 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -345,3 +345,17 @@ $ rustdoc src/lib.rs --sysroot /path/to/sysroot
345
345
346
346
Similar to ` rustc --sysroot ` , this lets you change the sysroot ` rustdoc ` uses
347
347
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
+
Original file line number Diff line number Diff line change @@ -346,19 +346,6 @@ details.
346
346
347
347
[ issue-display-warnings ] : https://github.com/rust-lang/rust/issues/41574
348
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 -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
-
362
349
### ` --extern-html-root-url ` : control how rustdoc links to non-local crates
363
350
364
351
Using this flag looks like this:
Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ fn opts() -> Vec<RustcOptGroup> {
286
286
\" light-suffix.css\" ",
287
287
"PATH" )
288
288
} ) ,
289
- unstable ( "edition" , |o| {
289
+ stable ( "edition" , |o| {
290
290
o. optopt( "" , "edition" ,
291
291
"edition to use when compiling rust code (default: 2015)" ,
292
292
"EDITION" )
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ impl Edition {
65
65
pub fn is_stable ( & self ) -> bool {
66
66
match * self {
67
67
Edition :: Edition2015 => true ,
68
- Edition :: Edition2018 => false ,
68
+ Edition :: Edition2018 => true ,
69
69
}
70
70
}
71
71
}
You can’t perform that action at this time.
0 commit comments