Skip to content

Commit 7541f82

Browse files
committed
Fix dead links in the guide and reorganize
1 parent 483fca9 commit 7541f82

Some content is hidden

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

43 files changed

+112
-669
lines changed

mk/docs.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,8 @@ endif
275275
docs: $(DOC_TARGETS)
276276
compiler-docs: $(COMPILER_DOC_TARGETS)
277277

278-
trpl: tmp/trpl.ok
278+
trpl: doc/book/index.html
279279

280-
tmp/trpl.ok: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/trpl/*.md)
280+
doc/book/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/trpl/*.md)
281281
$(Q)rm -rf doc/book
282282
$(Q)$(RUSTBOOK) build $(S)src/doc/trpl doc/book
283-
$(Q)touch $@

mk/tests.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ endef
156156

157157
$(foreach doc,$(DOCS), \
158158
$(eval $(call DOCTEST,md-$(doc),$(S)src/doc/$(doc).md)))
159-
$(foreach file,$(wildcard $(S)src/doc/trpl/src/*), \
160-
$(eval $(call DOCTEST,$(file:$(S)src/doc/trpl/src/%.md=trpl-%),$(file))))
159+
$(foreach file,$(wildcard $(S)src/doc/trpl/*.md), \
160+
$(eval $(call DOCTEST,$(file:$(S)src/doc/trpl/%.md=trpl-%),$(file))))
161161

162162
######################################################################
163163
# Main test targets

src/doc/trpl/SUMMARY.md

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
11
# Summary
22

3-
* [I: The Basics](src/basic.md)
4-
* [Installing Rust](src/installing-rust.md)
5-
* [Hello, world!](src/hello-world.md)
6-
* [Hello, Cargo!](src/hello-cargo.md)
7-
* [Variable Bindings](src/variable-bindings.md)
8-
* [If](src/if.md)
9-
* [Functions](src/functions.md)
10-
* [Comments](src/comments.md)
11-
* [Compound Data Types](src/compound-data-types.md)
12-
* [Match](src/match.md)
13-
* [Looping](src/looping.md)
14-
* [Strings](src/strings.md)
15-
* [Arrays, Vectors, and Slices](src/arrays-vectors-and-slices.md)
16-
* [Standard Input](src/standard-input.md)
17-
* [Guessing Game](src/guessing-game.md)
18-
* [II: Intermedite Rust](src/intermediate.md)
19-
* [Crates and Modules](src/crates-and-modules.md)
20-
* [Testing](src/testing.md)
21-
* [Pointers](src/pointers.md)
22-
* [Patterns](src/patterns.md)
23-
* [Method Syntax](src/method-syntax.md)
24-
* [Closures](src/closures.md)
25-
* [Iterators](src/iterators.md)
26-
* [Generics](src/generics.md)
27-
* [Traits](src/traits.md)
28-
* [Tasks](src/tasks.md)
29-
* [Error Handling](src/error-handling.md)
30-
* [III: Advanced Topics](src/advanced.md)
31-
* [FFI](src/ffi.md)
32-
* [Unsafe Code](src/unsafe.md)
33-
* [Macros](src/macros.md)
34-
* [Compiler Plugins](src/plugins.md)
35-
* [Conclusion](src/conclusion.md)
3+
* [I: The Basics](basic.md)
4+
* [Installing Rust](installing-rust.md)
5+
* [Hello, world!](hello-world.md)
6+
* [Hello, Cargo!](hello-cargo.md)
7+
* [Variable Bindings](variable-bindings.md)
8+
* [If](if.md)
9+
* [Functions](functions.md)
10+
* [Comments](comments.md)
11+
* [Compound Data Types](compound-data-types.md)
12+
* [Match](match.md)
13+
* [Looping](looping.md)
14+
* [Strings](strings.md)
15+
* [Arrays, Vectors, and Slices](arrays-vectors-and-slices.md)
16+
* [Standard Input](standard-input.md)
17+
* [Guessing Game](guessing-game.md)
18+
* [II: Intermediate Rust](intermediate.md)
19+
* [Crates and Modules](crates-and-modules.md)
20+
* [Testing](testing.md)
21+
* [Pointers](pointers.md)
22+
* [Ownership](ownership.md)
23+
* [Patterns](patterns.md)
24+
* [Method Syntax](method-syntax.md)
25+
* [Closures](closures.md)
26+
* [Iterators](iterators.md)
27+
* [Generics](generics.md)
28+
* [Traits](traits.md)
29+
* [Tasks](tasks.md)
30+
* [Error Handling](error-handling.md)
31+
* [III: Advanced Topics](advanced.md)
32+
* [FFI](ffi.md)
33+
* [Unsafe Code](unsafe.md)
34+
* [Macros](macros.md)
35+
* [Compiler Plugins](plugins.md)
36+
* [Conclusion](conclusion.md)
File renamed without changes.

src/doc/trpl/src/arrays-vectors-and-slices.md renamed to src/doc/trpl/arrays-vectors-and-slices.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Arrays, Vectors, and Slices
1+
% Arrays, Vectors, and Slices
22

33
Like many programming languages, Rust has list types to represent a sequence of
44
things. The most basic is the **array**, a fixed-size list of elements of the
@@ -48,7 +48,7 @@ errant access is the source of many bugs in other systems programming
4848
languages.
4949

5050
A **vector** is a dynamic or "growable" array, implemented as the standard
51-
library type [`Vec<T>`](std/vec/) (we'll talk about what the `<T>` means
51+
library type [`Vec<T>`](../std/vec/) (we'll talk about what the `<T>` means
5252
later). Vectors are to arrays what `String` is to `&str`. You can create them
5353
with the `vec!` macro:
5454

File renamed without changes.

src/doc/trpl/src/closures.md renamed to src/doc/trpl/closures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Closures
1+
% Closures
22

33
So far, we've made lots of functions in Rust, but we've given them all names.
44
Rust also allows us to create anonymous functions. Rust's anonymous

src/doc/trpl/src/comments.md renamed to src/doc/trpl/comments.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Comments
1+
% Comments
22

33
Now that we have some functions, it's a good idea to learn about comments.
44
Comments are notes that you leave to other programmers to help explain things
@@ -42,5 +42,5 @@ fn hello(name: &str) {
4242
When writing doc comments, adding sections for any arguments, return values,
4343
and providing some examples of usage is very, very helpful.
4444

45-
You can use the [`rustdoc`](rustdoc.html) tool to generate HTML documentation
45+
You can use the [`rustdoc`](../rustdoc.html) tool to generate HTML documentation
4646
from these doc comments.

src/doc/trpl/src/compound-data-types.md renamed to src/doc/trpl/compound-data-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Compound Data Types
1+
% Compound Data Types
22

33
Rust, like many programming languages, has a number of different data types
44
that are built-in. You've already done some simple work with integers and
File renamed without changes.

0 commit comments

Comments
 (0)