Skip to content

Backfill contents since 1.0 #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 38 commits into from
Aug 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
1a90605
wipe out the old book
steveklabnik Aug 3, 2018
56a19bc
skeleton
steveklabnik Aug 3, 2018
92900b0
get ready to add stuff
steveklabnik Aug 3, 2018
a38104b
Rust 1.1
steveklabnik Aug 3, 2018
feb51f6
Rust 1.2
steveklabnik Aug 3, 2018
1034c77
Rust 1.3
steveklabnik Aug 3, 2018
737544f
point out that we're missing lots of std stuff
steveklabnik Aug 3, 2018
f1ce7be
bugfix for nomicon version
steveklabnik Aug 3, 2018
ecbc680
Rust 1.5
steveklabnik Aug 3, 2018
3314372
Rust 1.6
steveklabnik Aug 3, 2018
89a085a
Rust 1.8
steveklabnik Aug 3, 2018
cc212a5
Rust 1.9
steveklabnik Aug 3, 2018
06911fb
fix to nomicon badge
steveklabnik Aug 3, 2018
0180bf7
Rust 1.10 and 1.11
steveklabnik Aug 3, 2018
a02d094
Rust 1.12
steveklabnik Aug 6, 2018
5a80f73
Rust 1.13
steveklabnik Aug 6, 2018
1879957
Rust 1.14
steveklabnik Aug 6, 2018
526fb29
Rust 1.15
steveklabnik Aug 6, 2018
201bdaa
Rust 1.16
steveklabnik Aug 6, 2018
0d2551c
Rust 1.17
steveklabnik Aug 6, 2018
1e8531f
Rust 1.18
steveklabnik Aug 6, 2018
757c6da
Rust 1.19
steveklabnik Aug 6, 2018
a3d858f
Rust 1.20
steveklabnik Aug 6, 2018
deb5b21
fix up some markdown
steveklabnik Aug 6, 2018
0f8214b
Rust 1.21
steveklabnik Aug 6, 2018
89c03e5
Rust 1.22
steveklabnik Aug 6, 2018
73648f1
Rust 1.24
steveklabnik Aug 6, 2018
76f29e1
Rust 1.25
steveklabnik Aug 6, 2018
b22406c
Rust 1.26
steveklabnik Aug 6, 2018
e7dd330
Rust 1.27
steveklabnik Aug 6, 2018
c2a6f85
Rust 1.28
steveklabnik Aug 6, 2018
9c1f326
Rust master
steveklabnik Aug 6, 2018
cc19f79
remove full features page
steveklabnik Aug 6, 2018
142e8f8
fix @simulacrum nits
steveklabnik Aug 7, 2018
daa9ccc
re-add the status page
steveklabnik Aug 7, 2018
93f196b
fix mdbook test
steveklabnik Aug 7, 2018
d322813
@centril review comments addressed
steveklabnik Aug 10, 2018
fcc1b17
typo fix
steveklabnik Aug 10, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
authors = ["The Rust Project Developers"]
multilingual = false
src = "src"
title = "The Rust Edition Guide"
title = "The Edition Guide"
17 changes: 0 additions & 17 deletions src/2018/transitioning/concurrency/async-await.md

This file was deleted.

10 changes: 0 additions & 10 deletions src/2018/transitioning/concurrency/index.md

This file was deleted.

5 changes: 0 additions & 5 deletions src/2018/transitioning/errors/index.md

This file was deleted.

13 changes: 0 additions & 13 deletions src/2018/transitioning/modules/index.md

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions src/2018/transitioning/ownership-and-lifetimes/index.md

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions src/2018/transitioning/to-rust-2018.md

This file was deleted.

5 changes: 0 additions & 5 deletions src/2018/transitioning/traits/index.md

This file was deleted.

95 changes: 68 additions & 27 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,71 @@
# Summary
# The Edition Guide

[Introduction](introduction.md)

- [What are Editions?](editions/index.md)
- [Transitioning your code to a new edition](editions/transitioning.md)

- [Rust 2015](2015/index.md)

- [Rust 2018](2018/index.md)
- [Feature status](2018/status.md)
- [Transitioning to Rust 2018](2018/transitioning/to-rust-2018.md)
- [Trait system](2018/transitioning/traits/index.md)
- [`dyn Trait`](2018/transitioning/traits/dyn-trait.md)
- [`impl Trait`](2018/transitioning/traits/impl-trait.md)
- [Module system](2018/transitioning/modules/index.md)
- [Path clarity](2018/transitioning/modules/path-clarity.md)
- [Macro changes](2018/transitioning/modules/macros.md)
- [Concurrency additions](2018/transitioning/concurrency/index.md)
- [`async`/`await`](2018/transitioning/concurrency/async-await.md)
- [Ownership and lifetimes](2018/transitioning/ownership-and-lifetimes/index.md)
- [`'_`, the anonymous lifetime](2018/transitioning/ownership-and-lifetimes/anonymous-lifetime.md)
- [In-band lifetimes](2018/transitioning/ownership-and-lifetimes/in-band-lifetimes.md)
- [Default match bindings](2018/transitioning/ownership-and-lifetimes/default-match-bindings.md)
- [Lifetime elision in `impl`](2018/transitioning/ownership-and-lifetimes/lifetime-elision-in-impl.md)
- [`T: 'a` inference in structs](2018/transitioning/ownership-and-lifetimes/struct-inference.md)
- [Slice patterns](2018/transitioning/slice-patterns.md)
- [Error Handling](2018/transitioning/errors/index.md)
- [`?` in `fn main()` and `#[test]`s](2018/transitioning/errors/question-mark.md)
- [Raw identifiers](2018/transitioning/raw-identifiers.md)
## What are editions?

- [What are editions?](editions/index.md)
- [Transitioning your code to a new edition](editions/transitioning-your-code-to-a-new-edition.md)

## Rust 2015

- [Rust 2015](rust-2015/index.md)

## Rust 2018

- [Rust 2018](rust-2018/index.md)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably organize this a bit into categories after this PR; The flat list is a bit chaotic.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found the categories far more confusing, personally

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it doesn't work well with ordering also... let's not do it for now then :)

- [MUSL support for fully static binaries](rust-2018/musl-support-for-fully-static-binaries.md)
- [`cargo rustc` for passing arbitrary flags to `rustc`](rust-2018/cargo-rustc-for-passing-arbitrary-flags-to-rustc.md)
- [MSVC toolchain support](rust-2018/msvc-toolchain-support.md)
- [Better support for trait objects](rust-2018/better-support-for-trait-objects.md)
- [The Rustonomicon](rust-2018/the-rustonomicon.md)
- [`cargo install` for easy installation of tools](rust-2018/cargo-install-for-easy-installation-of-tools.md)
- [`libcore` for low-level Rust](rust-2018/libcore-for-low-level-rust.md)
- [Crates.io disallows wildcard dependencies](rust-2018/crates-io-disallows-wildcard-dependencies.md)
- ["Operator-equals" are now implementable](rust-2018/operator-equals-are-now-implementable.md)
- [Controlling panics with `std::panic`](rust-2018/controlling-panics-with-std-panic.md)
- [An attribute for deprecation](rust-2018/an-attribute-for-deprecation.md)
- [Aborting on panic](rust-2018/aborting-on-panic.md)
- [`cdylib` crates for C interoperability](rust-2018/cdylib-crates-for-c-interoperability.md)
- [Improved error messages](rust-2018/improved-error-messages.md)
- [Cargo workspaces for multi-package projects](rust-2018/cargo-workspaces-for-multi-package-projects.md)
- [Cargo can use a local registry replacement](rust-2018/cargo-can-use-a-local-registry-replacement.md)
- [The question mark operator for easier error handling](rust-2018/the-question-mark-operator-for-easier-error-handling.md)
- [Rustup for managing Rust versions](rust-2018/rustup-for-managing-rust-versions.md)
- [WebAssembly support](rust-2018/webassembly-support.md)
- [Custom Derive](rust-2018/custom-derive.md)
- [`cargo check` for faster checking](rust-2018/cargo-check-for-faster-checking.md)
- [Simpler lifetimes in `static` and `const`](rust-2018/simpler-lifetimes-in-static-and-const.md)
- [Field init shorthand](rust-2018/field-init-shorthand.md)
- [New editions of the "the book"](rust-2018/new-editions-of-the-book.md)
- [`pub` learns some new tricks](rust-2018/pub-learns-some-new-tricks.md)
- [`union` for an unsafe form of `enum`](rust-2018/union-for-an-unsafe-form-of-enum.md)
- [Loops can `break` with a value](rust-2018/loops-can-break-with-a-value.md)
- [Associated constants](rust-2018/associated-constants.md)
- [`std::os` has documentation for all platforms](rust-2018/std-os-has-documentation-for-all-platforms.md)
- [The Rust Bookshelf](rust-2018/the-rust-bookshelf.md)
- [Replacing dependencies with `patch`](rust-2018/replacing-dependencies-with-patch.md)
- [Documentation tests can now `compile-fail`](rust-2018/documentation-tests-can-now-compile-fail.md)
- [Multi-file `examples`](rust-2018/multi-file-examples.md)
- [Incremental Compilation for faster compiles](rust-2018/incremental-compilation-for-faster-compiles.md)
- [Nested imports with `use`](rust-2018/nested-imports-with-use.md)
- [Rustdoc uses CommonMark](rust-2018/rustdoc-uses-commonmark.md)
- [Choosing alignment with the `repr` attribute](rust-2018/choosing-alignment-with-the-repr-attribute.md)
- [`cargo new` defaults to a binary project](rust-2018/cargo-new-defaults-to-a-binary-project.md)
- [`impl Trait` for returning complex types with ease](rust-2018/impl-trait-for-returning-complex-types-with-ease.md)
- [Default `match` bindings](rust-2018/default-match-bindings.md)
- [`..=` for inclusive ranges](rust-2018/inclusive-ranges.md)
- [Slice patterns](rust-2018/slice-patterns.md)
- [128 bit integers](rust-2018/128-bit-integers.md)
- [SIMD for faster computing](rust-2018/simd-for-faster-computing.md)
- [`dyn Trait` for trait objects](rust-2018/dyn-trait-for-trait-objects.md)
- [Global allocators](rust-2018/global-allocators.md)
- [Raw identifiers](rust-2018/raw-identifiers.md)
- [`'_`, the anonymous lifetime](rust-2018/the-anonymous-lifetime.md)
- [Lifetime elision in `impl`](rust-2018/lifetime-elision-in-impl.md)
- [`T: 'a` inference in structs](rust-2018/inference-in-structs.md)
- [Macro changes](rust-2018/macro-changes.md)
- [Path clarity](rust-2018/path-clarity.md)
- [`async`/`await` for easier concurrency](rust-2018/async-await-for-easier-concurrency.md)

- [Unstable feature status](unstable-feature-status.md)
2 changes: 1 addition & 1 deletion src/editions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ advantage of such features.
At the time of writing, there are two editions: 2015 and 2018. 2015 is today's
Rust; Rust 2018 will ship later this year. To transition to the 2018 edition
from the 2015 edition, you'll want to get started with the [transition
guide](editions/transitioning.html).
section](editions/transitioning-your-code-to-a-new-edition.html).
6 changes: 5 additions & 1 deletion src/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ In this guide, we'll discuss:
* What each edition is about
* How to migrate your code from one edition to another

Read on for more!
Note that the standard library grows with each Rust release; there are *many*
additions to the standard library that are not called out in this guide. Only
the major ones are, but there's tons of medium and small things that are
great too. You may want to check out [the standard library
documentation](https://doc.rust-lang.org/std/) as well.
2 changes: 1 addition & 1 deletion src/2015/index.md → src/rust-2015/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ projects on top of.

Since it's the default edition, there's no way to port your code to Rust
2015; it just *is*. You'll be transitioning *away* from 2015, but never
really *to* 2015. As such, there's not much else to say about it!
really *to* 2015. As such, there's not much else to say about it!
17 changes: 17 additions & 0 deletions src/rust-2018/128-bit-integers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 128 bit integers

![Minimum Rust version: 1.26](https://img.shields.io/badge/Minimum%20Rust%20Version-1.26-brightgreen.svg)

A very simple feature: Rust now has 128 bit integers!

```rust
let x: i128 = 0;
let y: u128 = 0;
```

These are twice the size of `u64`, and so can hold more values. More specifically,

* `u128`: `0` - `340,282,366,920,938,463,463,374,607,431,768,211,455`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kinda looks like an array; I'd use underscore instead as a separator.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we used this text in the release blog post and people were not generally confused

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose; however, 340_282_366_920_938_463_463_374_607_431_768_211_455 has the benefit of being legal Rust code :)

* `i128`: `−170,141,183,460,469,231,731,687,303,715,884,105,728` - `170,141,183,460,469,231,731,687,303,715,884,105,727`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too.


Whew!
18 changes: 18 additions & 0 deletions src/rust-2018/aborting-on-panic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Aborting on panic

![Minimum Rust version: 1.10](https://img.shields.io/badge/Minimum%20Rust%20Version-1.10-brightgreen.svg)

By default, Rust programs will unwind the stack when a `panic!` happens. If you'd prefer an
immediate abort instead, you can configure this in `Cargo.toml`:

```toml
[profile.debug]
panic = "abort"

[profile.release]
panic = "abort"
```

Why might you choose to do this? By removing support for unwinding, you'll
get smaller binaries. You will lose the ability to catch panics. Which choice
is right for you depends on exactly what you're doing.
Loading