diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
index 12bdfa5691dc7..2a3577a3d2044 100644
--- a/src/bootstrap/doc.rs
+++ b/src/bootstrap/doc.rs
@@ -62,11 +62,11 @@ macro_rules! book {
book!(
EditionGuide, "src/doc/edition-guide", "edition-guide", RustbookVersion::MdBook2;
EmbeddedBook, "src/doc/embedded-book", "embedded-book", RustbookVersion::MdBook2;
- Nomicon, "src/doc/nomicon", "nomicon", RustbookVersion::MdBook1;
+ Nomicon, "src/doc/nomicon", "nomicon", RustbookVersion::MdBook2;
Reference, "src/doc/reference", "reference", RustbookVersion::MdBook1;
RustByExample, "src/doc/rust-by-example", "rust-by-example", RustbookVersion::MdBook1;
RustcBook, "src/doc/rustc", "rustc", RustbookVersion::MdBook1;
- RustdocBook, "src/doc/rustdoc", "rustdoc", RustbookVersion::MdBook1;
+ RustdocBook, "src/doc/rustdoc", "rustdoc", RustbookVersion::MdBook2;
);
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@@ -134,7 +134,7 @@ impl Step for UnstableBook {
target: self.target,
name: INTERNER.intern_str("unstable-book"),
src: builder.md_doc_out(self.target),
- version: RustbookVersion::MdBook1,
+ version: RustbookVersion::MdBook2,
})
}
}
diff --git a/src/doc/rustdoc/src/command-line-arguments.md b/src/doc/rustdoc/src/command-line-arguments.md
index aba485f752ab2..b21defaedc313 100644
--- a/src/doc/rustdoc/src/command-line-arguments.md
+++ b/src/doc/rustdoc/src/command-line-arguments.md
@@ -178,7 +178,7 @@ $ rustdoc src/lib.rs --passes strip-priv-imports
An argument of "list" will print a list of possible "rustdoc passes", and other
arguments will be the name of which passes to run in addition to the defaults.
-For more details on passes, see [the chapter on them](passes.html).
+For more details on passes, see [the chapter on them](passes.md).
See also `--no-defaults`.
@@ -194,7 +194,7 @@ By default, `rustdoc` will run several passes over your code. This
removes those defaults, allowing you to use `--passes` to specify
exactly which passes you want.
-For more details on passes, see [the chapter on them](passes.html).
+For more details on passes, see [the chapter on them](passes.md).
See also `--passes`.
@@ -207,7 +207,7 @@ $ rustdoc src/lib.rs --test
```
This flag will run your code examples as tests. For more, see [the chapter
-on documentation tests](documentation-tests.html).
+on documentation tests](documentation-tests.md).
See also `--test-args`.
@@ -220,7 +220,7 @@ $ rustdoc src/lib.rs --test --test-args ignored
```
This flag will pass options to the test runner when running documentation tests.
-For more, see [the chapter on documentation tests](documentation-tests.html).
+For more, see [the chapter on documentation tests](documentation-tests.md).
See also `--test`.
diff --git a/src/doc/rustdoc/src/passes.md b/src/doc/rustdoc/src/passes.md
index 615b3dca199f1..12d4ea205b31e 100644
--- a/src/doc/rustdoc/src/passes.md
+++ b/src/doc/rustdoc/src/passes.md
@@ -5,8 +5,8 @@ Rustdoc has a concept called "passes". These are transformations that
In addition to the passes below, check out the docs for these flags:
-* [`--passes`](command-line-arguments.html#a--passes-add-more-rustdoc-passes)
-* [`--no-defaults`](command-line-arguments.html#a--no-defaults-dont-run-default-passes)
+* [`--passes`](command-line-arguments.md#--passes-add-more-rustdoc-passes)
+* [`--no-defaults`](command-line-arguments.md#--no-defaults-dont-run-default-passes)
## Default passes
diff --git a/src/doc/unstable-book/src/language-features/asm.md b/src/doc/unstable-book/src/language-features/asm.md
index f22095fe5de2e..2a1b6397781f9 100644
--- a/src/doc/unstable-book/src/language-features/asm.md
+++ b/src/doc/unstable-book/src/language-features/asm.md
@@ -190,4 +190,4 @@ constraints, etc.
[llvm-docs]: http://llvm.org/docs/LangRef.html#inline-assembler-expressions
If you need more power and don't mind losing some of the niceties of
-`asm!`, check out [global_asm](language-features/global-asm.html).
+`asm!`, check out [global_asm](global-asm.md).
diff --git a/src/doc/unstable-book/src/language-features/box-patterns.md b/src/doc/unstable-book/src/language-features/box-patterns.md
index 0896627acae1b..bf0819ec920b7 100644
--- a/src/doc/unstable-book/src/language-features/box-patterns.md
+++ b/src/doc/unstable-book/src/language-features/box-patterns.md
@@ -4,7 +4,7 @@ The tracking issue for this feature is: [#29641]
[#29641]: https://github.com/rust-lang/rust/issues/29641
-See also [`box_syntax`](language-features/box-syntax.html)
+See also [`box_syntax`](box-syntax.md)
------------------------
diff --git a/src/doc/unstable-book/src/language-features/box-syntax.md b/src/doc/unstable-book/src/language-features/box-syntax.md
index 414dc48e557d3..9569974d22ca2 100644
--- a/src/doc/unstable-book/src/language-features/box-syntax.md
+++ b/src/doc/unstable-book/src/language-features/box-syntax.md
@@ -4,7 +4,7 @@ The tracking issue for this feature is: [#49733]
[#49733]: https://github.com/rust-lang/rust/issues/49733
-See also [`box_patterns`](language-features/box-patterns.html)
+See also [`box_patterns`](box-patterns.md)
------------------------
diff --git a/src/doc/unstable-book/src/language-features/global-asm.md b/src/doc/unstable-book/src/language-features/global-asm.md
index f1ef74a63b513..bc55fe80fa64c 100644
--- a/src/doc/unstable-book/src/language-features/global-asm.md
+++ b/src/doc/unstable-book/src/language-features/global-asm.md
@@ -75,4 +75,4 @@ usages and placed the larger, single usage in the crate root.
If you don't need quite as much power and flexibility as
`global_asm!` provides, and you don't mind restricting your inline
assembly to `fn` bodies only, you might try the
-[asm](language-features/asm.html) feature instead.
+[asm](asm.md) feature instead.
diff --git a/src/doc/unstable-book/src/language-features/lang-items.md b/src/doc/unstable-book/src/language-features/lang-items.md
index b16739b4743a9..3ee024c6b5883 100644
--- a/src/doc/unstable-book/src/language-features/lang-items.md
+++ b/src/doc/unstable-book/src/language-features/lang-items.md
@@ -192,7 +192,7 @@ such as "```undefined reference to `__rust_probestack'```". Using this crate
also requires enabling the library feature `compiler_builtins_lib`. You can read
more about this [here][compiler-builtins-lib].
-[compiler-builtins-lib]: library-features/compiler-builtins-lib.html
+[compiler-builtins-lib]: ../library-features/compiler-builtins-lib.md
## More about the language items
diff --git a/src/doc/unstable-book/src/language-features/non-ascii-idents.md b/src/doc/unstable-book/src/language-features/non-ascii-idents.md
index 46957c00bf95c..22dae0c89a6ff 100644
--- a/src/doc/unstable-book/src/language-features/non-ascii-idents.md
+++ b/src/doc/unstable-book/src/language-features/non-ascii-idents.md
@@ -45,4 +45,4 @@ that does _not_ occur in the set of [strict keywords].
[`XID_start`]: http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5B%3AXID_Start%3A%5D&abb=on&g=&i=
[`XID_continue`]: http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5B%3AXID_Continue%3A%5D&abb=on&g=&i=
-[strict keywords]: ../reference/keywords.html#strict-keywords
+[strict keywords]: ../../reference/keywords.md#strict-keywords
diff --git a/src/doc/unstable-book/src/language-features/plugin-registrar.md b/src/doc/unstable-book/src/language-features/plugin-registrar.md
index b16e2ac2d221c..bf5dd81d735af 100644
--- a/src/doc/unstable-book/src/language-features/plugin-registrar.md
+++ b/src/doc/unstable-book/src/language-features/plugin-registrar.md
@@ -8,6 +8,6 @@ This feature is part of "compiler plugins." It will often be used with the
[`plugin`] and `rustc_private` features as well. For more details, see
their docs.
-[`plugin`]: language-features/plugin.html
+[`plugin`]: plugin.md
------------------------
diff --git a/src/doc/unstable-book/src/language-features/plugin.md b/src/doc/unstable-book/src/language-features/plugin.md
index 49fe7c9e994fe..43fffd680372f 100644
--- a/src/doc/unstable-book/src/language-features/plugin.md
+++ b/src/doc/unstable-book/src/language-features/plugin.md
@@ -8,7 +8,7 @@ The tracking issue for this feature is: [#29597]
This feature is part of "compiler plugins." It will often be used with the
[`plugin_registrar`] and `rustc_private` features.
-[`plugin_registrar`]: language-features/plugin-registrar.html
+[`plugin_registrar`]: plugin-registrar.md
------------------------
@@ -39,7 +39,7 @@ of a library.
Plugins can extend Rust's syntax in various ways. One kind of syntax extension
is the procedural macro. These are invoked the same way as [ordinary
-macros](../book/macros.html), but the expansion is performed by arbitrary Rust
+macros](../../book/macros.md), but the expansion is performed by arbitrary Rust
code that manipulates syntax trees at
compile time.
@@ -130,7 +130,7 @@ The advantages over a simple `fn(&str) -> u32` are:
a way to define new literal syntax for any data type.
In addition to procedural macros, you can define new
-[`derive`](../reference/attributes/derive.html)-like attributes and other kinds
+[`derive`](../../reference/attributes/derive.md)-like attributes and other kinds
of extensions. See `Registry::register_syntax_extension` and the
`SyntaxExtension` enum. For a more involved macro example, see
[`regex_macros`](https://github.com/rust-lang/regex/blob/master/regex_macros/src/lib.rs).
@@ -174,7 +174,7 @@ quasiquote as an ordinary plugin library.
# Lint plugins
Plugins can extend [Rust's lint
-infrastructure](../reference/attributes/diagnostics.html#lint-check-attributes) with
+infrastructure](../../reference/attributes/diagnostics.md#lint-check-attributes) with
additional checks for code style, safety, etc. Now let's write a plugin
[`lint_plugin_test.rs`](https://github.com/rust-lang/rust/blob/master/src/test/ui-fulldeps/auxiliary/lint_plugin_test.rs)
that warns about any item named `lintme`.
@@ -253,7 +253,7 @@ mostly use the same infrastructure as lint plugins, and provide examples of how
to access type information.
Lints defined by plugins are controlled by the usual [attributes and compiler
-flags](../reference/attributes/diagnostics.html#lint-check-attributes), e.g.
+flags](../../reference/attributes/diagnostics.md#lint-check-attributes), e.g.
`#[allow(test_lint)]` or `-A test-lint`. These identifiers are derived from the
first argument to `declare_lint!`, with appropriate case and punctuation
conversion.
diff --git a/src/doc/unstable-book/src/language-features/unboxed-closures.md b/src/doc/unstable-book/src/language-features/unboxed-closures.md
index d845c99a88a69..71003fba00ba2 100644
--- a/src/doc/unstable-book/src/language-features/unboxed-closures.md
+++ b/src/doc/unstable-book/src/language-features/unboxed-closures.md
@@ -2,7 +2,7 @@
The tracking issue for this feature is [#29625]
-See Also: [`fn_traits`](library-features/fn-traits.html)
+See Also: [`fn_traits`](../library-features/fn-traits.md)
[#29625]: https://github.com/rust-lang/rust/issues/29625
diff --git a/src/doc/unstable-book/src/library-features/fn-traits.md b/src/doc/unstable-book/src/library-features/fn-traits.md
index 72a3f36c10b69..29a8aecee6c2f 100644
--- a/src/doc/unstable-book/src/library-features/fn-traits.md
+++ b/src/doc/unstable-book/src/library-features/fn-traits.md
@@ -2,7 +2,7 @@
The tracking issue for this feature is [#29625]
-See Also: [`unboxed_closures`](language-features/unboxed-closures.html)
+See Also: [`unboxed_closures`](../language-features/unboxed-closures.md)
[#29625]: https://github.com/rust-lang/rust/issues/29625
diff --git a/src/doc/unstable-book/src/library-features/fnbox.md b/src/doc/unstable-book/src/library-features/fnbox.md
index cb3386b715211..97e32cc0acb12 100644
--- a/src/doc/unstable-book/src/library-features/fnbox.md
+++ b/src/doc/unstable-book/src/library-features/fnbox.md
@@ -27,6 +27,6 @@ impl Fn for &F where F: Fn + ?Sized {}
Before the introduction of [`unsized_locals`][unsized_locals], we had been unable to provide the former impls. That means, unlike `&dyn Fn()` or `&mut dyn FnMut()` we could not use `Box` at that time.
-[unsized_locals]: language-features/unsized-locals.html
+[unsized_locals]: ../language-features/unsized-locals.md
`FnBox()` is an alternative approach to `Box` is delegated to `FnBox::call_box` which doesn't need unsized locals. As we now have `Box` working, the `fnbox` feature is going to be removed.
diff --git a/src/doc/unstable-book/src/the-unstable-book.md b/src/doc/unstable-book/src/the-unstable-book.md
index 604b449f16379..554c52c3c9c27 100644
--- a/src/doc/unstable-book/src/the-unstable-book.md
+++ b/src/doc/unstable-book/src/the-unstable-book.md
@@ -14,7 +14,7 @@ fn main() {
The `box_syntax` feature [has a chapter][box] describing how to use it.
-[box]: language-features/box-syntax.html
+[box]: language-features/box-syntax.md
Because this documentation relates to unstable features, we make no guarantees
that what is contained here is accurate or up to date. It's developed on a