Skip to content

Commit

Permalink
Auto merge of #39866 - steveklabnik:unstable-book, r=alexcrichton
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Feb 22, 2017
2 parents fc6f092 + 06e311b commit bfe4597
Show file tree
Hide file tree
Showing 111 changed files with 1,502 additions and 569 deletions.
9 changes: 9 additions & 0 deletions src/bootstrap/step.rs
Expand Up @@ -577,6 +577,15 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
})
.default(build.config.docs)
.run(move |s| doc::rustbook(build, s.target, "reference"));
rules.doc("doc-unstable-book", "src/doc/unstable-book")
.dep(move |s| {
s.name("tool-rustbook")
.host(&build.config.build)
.target(&build.config.build)
.stage(0)
})
.default(build.config.docs)
.run(move |s| doc::rustbook(build, s.target, "unstable-book"));
rules.doc("doc-standalone", "src/doc")
.dep(move |s| {
s.name("rustc")
Expand Down
2 changes: 0 additions & 2 deletions src/doc/book/src/README.md
Expand Up @@ -21,15 +21,13 @@ is the first. After this:
* [Tutorial: Guessing Game][gg] - Learn some Rust with a small project.
* [Syntax and Semantics][ss] - Each bit of Rust, broken down into small chunks.
* [Effective Rust][er] - Higher-level concepts for writing excellent Rust code.
* [Nightly Rust][nr] - Cutting-edge features that aren’t in stable builds yet.
* [Glossary][gl] - A reference of terms used in the book.
* [Bibliography][bi] - Background on Rust's influences, papers about Rust.

[gs]: getting-started.html
[gg]: guessing-game.html
[er]: effective-rust.html
[ss]: syntax-and-semantics.html
[nr]: nightly-rust.html
[gl]: glossary.html
[bi]: bibliography.html

Expand Down
12 changes: 0 additions & 12 deletions src/doc/book/src/SUMMARY.md
Expand Up @@ -55,18 +55,6 @@
* [Release Channels](release-channels.md)
* [Using Rust without the standard library](using-rust-without-the-standard-library.md)
* [Procedural Macros (and custom derive)](procedural-macros.md)
* [Nightly Rust](nightly-rust.md)
* [Compiler Plugins](compiler-plugins.md)
* [Inline Assembly](inline-assembly.md)
* [No stdlib](no-stdlib.md)
* [Intrinsics](intrinsics.md)
* [Lang items](lang-items.md)
* [Advanced linking](advanced-linking.md)
* [Benchmark Tests](benchmark-tests.md)
* [Box Syntax and Patterns](box-syntax-and-patterns.md)
* [Slice Patterns](slice-patterns.md)
* [Associated Constants](associated-constants.md)
* [Custom Allocators](custom-allocators.md)
* [Glossary](glossary.md)
* [Syntax Index](syntax-index.md)
* [Bibliography](bibliography.md)
145 changes: 0 additions & 145 deletions src/doc/book/src/advanced-linking.md

This file was deleted.

100 changes: 0 additions & 100 deletions src/doc/book/src/box-syntax-and-patterns.md

This file was deleted.

9 changes: 3 additions & 6 deletions src/doc/book/src/casting-between-types.md
Expand Up @@ -151,12 +151,9 @@ elements of the array. These kinds of casts are very dangerous, because they
make assumptions about the way that multiple underlying structures are
implemented. For this, we need something more dangerous.

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

[intrinsics]: intrinsics.html
The `transmute` function is very simple, but very scary. It tells Rust to treat
a value of one type as though it were another type. It does this regardless of
the typechecking system, and completely trusts you.

In our previous example, we know that an array of four `u8`s represents a `u32`
properly, and so we want to do the cast. Using `transmute` instead of `as`,
Expand Down
5 changes: 1 addition & 4 deletions src/doc/book/src/conditional-compilation.md
Expand Up @@ -79,16 +79,13 @@ Will be the same as `#[b]` if `a` is set by `cfg` attribute, and nothing otherwi

# cfg!

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

```rust
if cfg!(target_os = "macos") || cfg!(target_os = "ios") {
println!("Think Different!");
}
```

[compilerplugins]: compiler-plugins.html

These will be replaced by a `true` or `false` at compile-time, depending on the
configuration settings.

0 comments on commit bfe4597

Please sign in to comment.