Skip to content

Commit c937254

Browse files
committed
Start the port of the reference to mdBook
This only really moves the files, there's a lot more work coming in the next commits. Part of rust-lang#39588.
1 parent 8a1ce40 commit c937254

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+4090
-4
lines changed

src/bootstrap/doc.rs

-4
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,6 @@ pub fn standalone(build: &Build, target: &str) {
115115
.arg("-o").arg(&out)
116116
.arg(&path);
117117

118-
if filename == "reference.md" {
119-
cmd.arg("--html-in-header").arg(&full_toc);
120-
}
121-
122118
if filename == "not_found.md" {
123119
cmd.arg("--markdown-no-toc")
124120
.arg("--markdown-css")

src/bootstrap/step.rs

+9
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,15 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
568568
})
569569
.default(build.config.docs)
570570
.run(move |s| doc::rustbook(build, s.target, "nomicon"));
571+
rules.doc("doc-reference", "src/doc/reference")
572+
.dep(move |s| {
573+
s.name("tool-rustbook")
574+
.host(&build.config.build)
575+
.target(&build.config.build)
576+
.stage(0)
577+
})
578+
.default(build.config.docs)
579+
.run(move |s| doc::rustbook(build, s.target, "reference"));
571580
rules.doc("doc-standalone", "src/doc")
572581
.dep(move |s| {
573582
s.name("rustc")

src/doc/reference/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
book

src/doc/reference/src/SUMMARY.md

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# The Rust Reference
2+
3+
[Introduction](introduction.md)
4+
5+
- [Notation](notation.md)
6+
- [Unicode productions](unicode-productions.md)
7+
- [String table productions](string-table-productions.md)
8+
9+
- [Lexical structure](lexical-structure.md)
10+
- [Input format](input-format.md)
11+
- [Identifiers](identifiers.md)
12+
- [Comments](comments.md)
13+
- [Whitespace](whitespace.md)
14+
- [Tokens](tokens.md)
15+
- [Paths](paths.md)
16+
17+
- [Macros](macros.md)
18+
- [Macros By Example](macros-by-example.md)
19+
- [Procedrual Macros](procedural-macros.md)
20+
21+
- [Crates and source files](crates-and-source-files.md)
22+
23+
- [Items and attributes](items-and-attributes.md)
24+
- [Items](items.md)
25+
- [Visibility and Privacy](visibility-and-privacy.md)
26+
- [Attributes](attributes.md)
27+
28+
- [Statements and expressions](statements-and-expressions.md)
29+
- [Statements](statements.md)
30+
- [Expressions](expressions.md)
31+
32+
- [Type system](type-system.md)
33+
- [Types](types.md)
34+
- [Subtyping](subtyping.md)
35+
- [Type coercions](type-coercions.md)
36+
37+
- [Special traits](special-traits.md)
38+
- [The Copy trait](the-copy-trait.md)
39+
- [The Sized trait](the-sized-trait.md)
40+
- [The Drop trait](the-drop-trait.md)
41+
- [The Deref trait](the-deref-trait.md)
42+
- [The Send trait](the-send-trait.md)
43+
- [The Sync trait](the-sync-trait.md)
44+
45+
- [Memory model](memory-model.md)
46+
- [Memory allocation and lifetime](memory-allocation-and-lifetime.md)
47+
- [Memory ownership](memory-ownership.md)
48+
- [Variables](variables.md)
49+
50+
- [Linkage](linkage.md)
51+
52+
- [Unsafety](unsafety.md)
53+
- [Unsafe functions](unsafe-functions.md)
54+
- [Unsafe blocks](unsafe-blocks.md)
55+
- [Behavior considered undefined](behavior-considered-undefined.md)
56+
- [Behavior not considered unsafe](behavior-not-considered-unsafe.md)
57+
58+
[Appendix: Influences](influences.md)

0 commit comments

Comments
 (0)