Skip to content

Commit bfe4597

Browse files
committed
Auto merge of #39866 - steveklabnik:unstable-book, r=alexcrichton
Create the Unstable Book Part of #39588 This isn't done yet. To do: - [x] import the nightly book contents here - [ ] possibly write some more chapters This will _not_ be done before it lands; that's part of the whole unstable thing.
2 parents fc6f092 + 06e311b commit bfe4597

File tree

111 files changed

+1502
-569
lines changed

Some content is hidden

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

111 files changed

+1502
-569
lines changed

src/bootstrap/step.rs

+9
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,15 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
577577
})
578578
.default(build.config.docs)
579579
.run(move |s| doc::rustbook(build, s.target, "reference"));
580+
rules.doc("doc-unstable-book", "src/doc/unstable-book")
581+
.dep(move |s| {
582+
s.name("tool-rustbook")
583+
.host(&build.config.build)
584+
.target(&build.config.build)
585+
.stage(0)
586+
})
587+
.default(build.config.docs)
588+
.run(move |s| doc::rustbook(build, s.target, "unstable-book"));
580589
rules.doc("doc-standalone", "src/doc")
581590
.dep(move |s| {
582591
s.name("rustc")

src/doc/book/src/README.md

-2
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,13 @@ is the first. After this:
2121
* [Tutorial: Guessing Game][gg] - Learn some Rust with a small project.
2222
* [Syntax and Semantics][ss] - Each bit of Rust, broken down into small chunks.
2323
* [Effective Rust][er] - Higher-level concepts for writing excellent Rust code.
24-
* [Nightly Rust][nr] - Cutting-edge features that aren’t in stable builds yet.
2524
* [Glossary][gl] - A reference of terms used in the book.
2625
* [Bibliography][bi] - Background on Rust's influences, papers about Rust.
2726

2827
[gs]: getting-started.html
2928
[gg]: guessing-game.html
3029
[er]: effective-rust.html
3130
[ss]: syntax-and-semantics.html
32-
[nr]: nightly-rust.html
3331
[gl]: glossary.html
3432
[bi]: bibliography.html
3533

src/doc/book/src/SUMMARY.md

-12
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,6 @@
5555
* [Release Channels](release-channels.md)
5656
* [Using Rust without the standard library](using-rust-without-the-standard-library.md)
5757
* [Procedural Macros (and custom derive)](procedural-macros.md)
58-
* [Nightly Rust](nightly-rust.md)
59-
* [Compiler Plugins](compiler-plugins.md)
60-
* [Inline Assembly](inline-assembly.md)
61-
* [No stdlib](no-stdlib.md)
62-
* [Intrinsics](intrinsics.md)
63-
* [Lang items](lang-items.md)
64-
* [Advanced linking](advanced-linking.md)
65-
* [Benchmark Tests](benchmark-tests.md)
66-
* [Box Syntax and Patterns](box-syntax-and-patterns.md)
67-
* [Slice Patterns](slice-patterns.md)
68-
* [Associated Constants](associated-constants.md)
69-
* [Custom Allocators](custom-allocators.md)
7058
* [Glossary](glossary.md)
7159
* [Syntax Index](syntax-index.md)
7260
* [Bibliography](bibliography.md)

src/doc/book/src/advanced-linking.md

-145
This file was deleted.

src/doc/book/src/box-syntax-and-patterns.md

-100
This file was deleted.

src/doc/book/src/casting-between-types.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,9 @@ elements of the array. These kinds of casts are very dangerous, because they
151151
make assumptions about the way that multiple underlying structures are
152152
implemented. For this, we need something more dangerous.
153153

154-
The `transmute` function is provided by a [compiler intrinsic][intrinsics], and
155-
what it does is very simple, but very scary. It tells Rust to treat a value of
156-
one type as though it were another type. It does this regardless of the
157-
typechecking system, and completely trusts you.
158-
159-
[intrinsics]: intrinsics.html
154+
The `transmute` function is very simple, but very scary. It tells Rust to treat
155+
a value of one type as though it were another type. It does this regardless of
156+
the typechecking system, and completely trusts you.
160157

161158
In our previous example, we know that an array of four `u8`s represents a `u32`
162159
properly, and so we want to do the cast. Using `transmute` instead of `as`,

src/doc/book/src/conditional-compilation.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,13 @@ Will be the same as `#[b]` if `a` is set by `cfg` attribute, and nothing otherwi
7979

8080
# cfg!
8181

82-
The `cfg!` [syntax extension][compilerplugins] lets you use these kinds of flags
83-
elsewhere in your code, too:
82+
The `cfg!` macro lets you use these kinds of flags elsewhere in your code, too:
8483

8584
```rust
8685
if cfg!(target_os = "macos") || cfg!(target_os = "ios") {
8786
println!("Think Different!");
8887
}
8988
```
9089

91-
[compilerplugins]: compiler-plugins.html
92-
9390
These will be replaced by a `true` or `false` at compile-time, depending on the
9491
configuration settings.

0 commit comments

Comments
 (0)