Skip to content

Commit f100dfb

Browse files
authored
Rollup merge of #61372 - mati865:books, r=Centril,GuillaumeGomez
Migrate some books to mdbook version 0.2 There are 3 books still using old version but they need more effort so I hope to do them in subsequent PR if I find the time.
2 parents f20b5cc + dacf19c commit f100dfb

15 files changed

+25
-25
lines changed

src/bootstrap/doc.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ macro_rules! book {
6262
book!(
6363
EditionGuide, "src/doc/edition-guide", "edition-guide", RustbookVersion::MdBook2;
6464
EmbeddedBook, "src/doc/embedded-book", "embedded-book", RustbookVersion::MdBook2;
65-
Nomicon, "src/doc/nomicon", "nomicon", RustbookVersion::MdBook1;
65+
Nomicon, "src/doc/nomicon", "nomicon", RustbookVersion::MdBook2;
6666
Reference, "src/doc/reference", "reference", RustbookVersion::MdBook1;
6767
RustByExample, "src/doc/rust-by-example", "rust-by-example", RustbookVersion::MdBook1;
6868
RustcBook, "src/doc/rustc", "rustc", RustbookVersion::MdBook1;
69-
RustdocBook, "src/doc/rustdoc", "rustdoc", RustbookVersion::MdBook1;
69+
RustdocBook, "src/doc/rustdoc", "rustdoc", RustbookVersion::MdBook2;
7070
);
7171

7272
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@@ -134,7 +134,7 @@ impl Step for UnstableBook {
134134
target: self.target,
135135
name: INTERNER.intern_str("unstable-book"),
136136
src: builder.md_doc_out(self.target),
137-
version: RustbookVersion::MdBook1,
137+
version: RustbookVersion::MdBook2,
138138
})
139139
}
140140
}

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ $ rustdoc src/lib.rs --passes strip-priv-imports
178178
An argument of "list" will print a list of possible "rustdoc passes", and other
179179
arguments will be the name of which passes to run in addition to the defaults.
180180

181-
For more details on passes, see [the chapter on them](passes.html).
181+
For more details on passes, see [the chapter on them](passes.md).
182182

183183
See also `--no-defaults`.
184184

@@ -194,7 +194,7 @@ By default, `rustdoc` will run several passes over your code. This
194194
removes those defaults, allowing you to use `--passes` to specify
195195
exactly which passes you want.
196196

197-
For more details on passes, see [the chapter on them](passes.html).
197+
For more details on passes, see [the chapter on them](passes.md).
198198

199199
See also `--passes`.
200200

@@ -207,7 +207,7 @@ $ rustdoc src/lib.rs --test
207207
```
208208

209209
This flag will run your code examples as tests. For more, see [the chapter
210-
on documentation tests](documentation-tests.html).
210+
on documentation tests](documentation-tests.md).
211211

212212
See also `--test-args`.
213213

@@ -220,7 +220,7 @@ $ rustdoc src/lib.rs --test --test-args ignored
220220
```
221221

222222
This flag will pass options to the test runner when running documentation tests.
223-
For more, see [the chapter on documentation tests](documentation-tests.html).
223+
For more, see [the chapter on documentation tests](documentation-tests.md).
224224

225225
See also `--test`.
226226

src/doc/rustdoc/src/passes.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Rustdoc has a concept called "passes". These are transformations that
55

66
In addition to the passes below, check out the docs for these flags:
77

8-
* [`--passes`](command-line-arguments.html#a--passes-add-more-rustdoc-passes)
9-
* [`--no-defaults`](command-line-arguments.html#a--no-defaults-dont-run-default-passes)
8+
* [`--passes`](command-line-arguments.md#--passes-add-more-rustdoc-passes)
9+
* [`--no-defaults`](command-line-arguments.md#--no-defaults-dont-run-default-passes)
1010

1111
## Default passes
1212

src/doc/unstable-book/src/language-features/asm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,4 +190,4 @@ constraints, etc.
190190
[llvm-docs]: http://llvm.org/docs/LangRef.html#inline-assembler-expressions
191191

192192
If you need more power and don't mind losing some of the niceties of
193-
`asm!`, check out [global_asm](language-features/global-asm.html).
193+
`asm!`, check out [global_asm](global-asm.md).

src/doc/unstable-book/src/language-features/box-patterns.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The tracking issue for this feature is: [#29641]
44

55
[#29641]: https://github.com/rust-lang/rust/issues/29641
66

7-
See also [`box_syntax`](language-features/box-syntax.html)
7+
See also [`box_syntax`](box-syntax.md)
88

99
------------------------
1010

src/doc/unstable-book/src/language-features/box-syntax.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The tracking issue for this feature is: [#49733]
44

55
[#49733]: https://github.com/rust-lang/rust/issues/49733
66

7-
See also [`box_patterns`](language-features/box-patterns.html)
7+
See also [`box_patterns`](box-patterns.md)
88

99
------------------------
1010

src/doc/unstable-book/src/language-features/global-asm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ usages and placed the larger, single usage in the crate root.
7575
If you don't need quite as much power and flexibility as
7676
`global_asm!` provides, and you don't mind restricting your inline
7777
assembly to `fn` bodies only, you might try the
78-
[asm](language-features/asm.html) feature instead.
78+
[asm](asm.md) feature instead.

src/doc/unstable-book/src/language-features/lang-items.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ such as "```undefined reference to `__rust_probestack'```". Using this crate
192192
also requires enabling the library feature `compiler_builtins_lib`. You can read
193193
more about this [here][compiler-builtins-lib].
194194

195-
[compiler-builtins-lib]: library-features/compiler-builtins-lib.html
195+
[compiler-builtins-lib]: ../library-features/compiler-builtins-lib.md
196196

197197
## More about the language items
198198

src/doc/unstable-book/src/language-features/non-ascii-idents.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ that does _not_ occur in the set of [strict keywords].
4545
4646
[`XID_start`]: http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5B%3AXID_Start%3A%5D&abb=on&g=&i=
4747
[`XID_continue`]: http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5B%3AXID_Continue%3A%5D&abb=on&g=&i=
48-
[strict keywords]: ../reference/keywords.html#strict-keywords
48+
[strict keywords]: ../../reference/keywords.md#strict-keywords

src/doc/unstable-book/src/language-features/plugin-registrar.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ This feature is part of "compiler plugins." It will often be used with the
88
[`plugin`] and `rustc_private` features as well. For more details, see
99
their docs.
1010

11-
[`plugin`]: language-features/plugin.html
11+
[`plugin`]: plugin.md
1212

1313
------------------------

src/doc/unstable-book/src/language-features/plugin.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The tracking issue for this feature is: [#29597]
88
This feature is part of "compiler plugins." It will often be used with the
99
[`plugin_registrar`] and `rustc_private` features.
1010

11-
[`plugin_registrar`]: language-features/plugin-registrar.html
11+
[`plugin_registrar`]: plugin-registrar.md
1212

1313
------------------------
1414

@@ -39,7 +39,7 @@ of a library.
3939

4040
Plugins can extend Rust's syntax in various ways. One kind of syntax extension
4141
is the procedural macro. These are invoked the same way as [ordinary
42-
macros](../book/macros.html), but the expansion is performed by arbitrary Rust
42+
macros](../../book/macros.md), but the expansion is performed by arbitrary Rust
4343
code that manipulates syntax trees at
4444
compile time.
4545

@@ -130,7 +130,7 @@ The advantages over a simple `fn(&str) -> u32` are:
130130
a way to define new literal syntax for any data type.
131131

132132
In addition to procedural macros, you can define new
133-
[`derive`](../reference/attributes/derive.html)-like attributes and other kinds
133+
[`derive`](../../reference/attributes/derive.md)-like attributes and other kinds
134134
of extensions. See `Registry::register_syntax_extension` and the
135135
`SyntaxExtension` enum. For a more involved macro example, see
136136
[`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.
174174
# Lint plugins
175175

176176
Plugins can extend [Rust's lint
177-
infrastructure](../reference/attributes/diagnostics.html#lint-check-attributes) with
177+
infrastructure](../../reference/attributes/diagnostics.md#lint-check-attributes) with
178178
additional checks for code style, safety, etc. Now let's write a plugin
179179
[`lint_plugin_test.rs`](https://github.com/rust-lang/rust/blob/master/src/test/ui-fulldeps/auxiliary/lint_plugin_test.rs)
180180
that warns about any item named `lintme`.
@@ -253,7 +253,7 @@ mostly use the same infrastructure as lint plugins, and provide examples of how
253253
to access type information.
254254

255255
Lints defined by plugins are controlled by the usual [attributes and compiler
256-
flags](../reference/attributes/diagnostics.html#lint-check-attributes), e.g.
256+
flags](../../reference/attributes/diagnostics.md#lint-check-attributes), e.g.
257257
`#[allow(test_lint)]` or `-A test-lint`. These identifiers are derived from the
258258
first argument to `declare_lint!`, with appropriate case and punctuation
259259
conversion.

src/doc/unstable-book/src/language-features/unboxed-closures.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The tracking issue for this feature is [#29625]
44

5-
See Also: [`fn_traits`](library-features/fn-traits.html)
5+
See Also: [`fn_traits`](../library-features/fn-traits.md)
66

77
[#29625]: https://github.com/rust-lang/rust/issues/29625
88

src/doc/unstable-book/src/library-features/fn-traits.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The tracking issue for this feature is [#29625]
44

5-
See Also: [`unboxed_closures`](language-features/unboxed-closures.html)
5+
See Also: [`unboxed_closures`](../language-features/unboxed-closures.md)
66

77
[#29625]: https://github.com/rust-lang/rust/issues/29625
88

src/doc/unstable-book/src/library-features/fnbox.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ impl<A, F> Fn for &F where F: Fn<A> + ?Sized {}
2727

2828
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<dyn FnOnce()>` at that time.
2929

30-
[unsized_locals]: language-features/unsized-locals.html
30+
[unsized_locals]: ../language-features/unsized-locals.md
3131

3232
`FnBox()` is an alternative approach to `Box<dyn FnBox()>` is delegated to `FnBox::call_box` which doesn't need unsized locals. As we now have `Box<dyn FnOnce()>` working, the `fnbox` feature is going to be removed.

src/doc/unstable-book/src/the-unstable-book.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn main() {
1414

1515
The `box_syntax` feature [has a chapter][box] describing how to use it.
1616

17-
[box]: language-features/box-syntax.html
17+
[box]: language-features/box-syntax.md
1818

1919
Because this documentation relates to unstable features, we make no guarantees
2020
that what is contained here is accurate or up to date. It's developed on a

0 commit comments

Comments
 (0)