Skip to content
This repository has been archived by the owner on May 5, 2019. It is now read-only.

Commit

Permalink
Merge pull request rust-lang#90 from rust-lang-nursery/reorganization
Browse files Browse the repository at this point in the history
Reorganize the edition guide
  • Loading branch information
aturon authored Aug 15, 2018
2 parents da281cd + 22026ab commit 4b1ab87
Show file tree
Hide file tree
Showing 67 changed files with 155 additions and 71 deletions.
116 changes: 64 additions & 52 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,59 +14,71 @@
## Rust 2018

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

- [Unstable feature status](unstable-feature-status.md)
6 changes: 3 additions & 3 deletions src/editions/transitioning-your-code-to-a-new-edition.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ note that during the time the preview is available, we may continue to add/enabl
new features with this flag!

For Rust 2018 edition preview 2, we're also testing a [new module path
variant](rust-2018/path-clarity.html), "uniform paths", which we'd like to get
further testing and feedback on. Please try it out, by adding the following to
your `lib.rs` or `main.rs`:
variant](rust-2018/module-system/path-clarity.html), "uniform paths",
which we'd like to get further testing and feedback on.
Please try it out, by adding the following to your `lib.rs` or `main.rs`:

```rust
#![feature(rust_2018_preview, uniform_paths)]
Expand Down
6 changes: 6 additions & 0 deletions src/rust-2018/cargo-and-crates-io/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Cargo and crates.io

[check]: improved-error-messages.md

In this chapter of the guide, we discuss a few improvements to `cargo` and crates.io.
A notable addition here is the new [`cargo check`][check] command.
6 changes: 6 additions & 0 deletions src/rust-2018/control-flow/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Control flow

[async_await]: async-await-for-easier-concurrency.md

In this chapter of the guide, we discuss a few improvements to control flow.
The most notable of these *will* be [`async` and `await`][async_await].
6 changes: 6 additions & 0 deletions src/rust-2018/data-types/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Data types

[fis]: field-init-shorthand.md

In this chapter of the guide, we discuss a few improvements to data types.
One of these are [field-init-shorthand][fis].
6 changes: 6 additions & 0 deletions src/rust-2018/documentation/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Documentation

[sec_ed]: new-editions-of-the-book.md

In this chapter of the guide, we discuss a few improvements to documentation.
A notable addition here is the [second edition of "the book"][sec_ed].
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ the second edition is frozen.
The names are a bit confusing though, because the "second edition" of the
book is the first printed edition of the book. As such, we decided that newer
editions of the book will correspond with newer editions of Rust itself, and
so starting with 1.28, we've been shiping drafts of the next version, [the
so starting with 1.28, we've been shipping drafts of the next version, [the
2018 Edition](https://doc.rust-lang.org/book/2018-edition/index.html). It's
still pretty close to the second edition, but contains information about
newer features since the book's content was frozen. We'll be continuing to
Expand Down
6 changes: 6 additions & 0 deletions src/rust-2018/error-handling-and-panics/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Error handling and Panics

[qop]: the-question-mark-operator-for-easier-error-handling.md

In this chapter of the guide, we discuss a few improvements to error handling
in Rust. The most notable of these is [the introduction of the `?` operator][qop].
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The question mark operator for easier error handling
# The `?` operator for easier error handling

![Minimum Rust version: 1.13](https://img.shields.io/badge/Minimum%20Rust%20Version-1.13-brightgreen.svg) for `Result<T, E>`

Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions src/rust-2018/macros/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Macros

[custom-derive]: custom-derive.md

In this chapter of the guide, we discuss a few improvements to the macro system.
A notable addition here is the introduction of [custom derive macros][custom-derive].
File renamed without changes.
6 changes: 6 additions & 0 deletions src/rust-2018/module-system/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Module system

[path clarity changes]: path-clarity.md

In this chapter of the guide, we discuss a few changes to the module system.
The most notable of these are the [path clarity changes].
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `pub` learns some new tricks
# More visibility modifiers

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ and then there is no step two. If you're not using Cargo, you already had to pas
keep doing what you were doing there as well.

One other use for `extern crate` was to import macros; that's no longer needed.
Check [the macro section](2018/transitioning/modules/macros.html) for more.
Check [the macro section](rust-2018/macros/macro-changes.html) for more.

### The `crate` keyword refers to the current crate.

Expand Down
6 changes: 6 additions & 0 deletions src/rust-2018/ownership-and-lifetimes/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ownership and lifetimes

[dmbm]: default-match-binding.md

In this chapter of the guide, we discuss a few improvements to ownership and lifetimes.
One of the most notable of these is [default match binding modes][dmbm].
6 changes: 6 additions & 0 deletions src/rust-2018/platform-and-target-support/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Platform and target support

[libcore]: libcore-for-low-level-rust.md

In this chapter of the guide, we discuss a few improvements to platform and target support.
A notable addition to it was [that the `libcore` library now works on stable Rust][libcore].
6 changes: 6 additions & 0 deletions src/rust-2018/rustdoc/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# `rustdoc`

[cf]: documentation-tests-can-now-compile-fail.md

In this chapter of the guide, we discuss a few improvements to `rustdoc`.
A notable addition to it was [that documentation tests can now compile-fail][cf].
2 changes: 1 addition & 1 deletion src/rust-2018/simd-for-faster-computing.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn foo() {
```

Here, we use cfg flags to choose the correct version based on the machine
we’re targetting; on x86 we use that version, and on x86_64 we use its
we’re targeting; on x86 we use that version, and on x86_64 we use its
version. We can also choose at runtime:

```rust,ignore
Expand Down
6 changes: 6 additions & 0 deletions src/rust-2018/the-compiler/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# The compiler

[errors]: improved-error-messages.md

In this chapter of the guide, we discuss a few improvements to the compiler.
A notable addition here is our new and [improved error messages][errors].
6 changes: 6 additions & 0 deletions src/rust-2018/trait-system/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Trait system

[impl_trait]: impl-trait-for-returning-complex-types-with-ease.md

In this chapter of the guide, we discuss a few improvements to the trait system.
The most notable of these is [`impl Trait`][impl_trait].
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Better support for trait objects
# More container types support trait objects

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

Expand Down
20 changes: 10 additions & 10 deletions src/unstable-feature-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
[Shipped, 1.26]: https://blog.rust-lang.org/2018/05/10/Rust-1.26.html
[Shipped, 1.27]: https://blog.rust-lang.org/2018/06/21/Rust-1.27.html

[`impl Trait`]: rust-2018/impl-trait-for-returning-complex-types-with-ease.html
[`impl Trait`]: rust-2018/trait-system/impl-trait-for-returning-complex-types-with-ease.html
[Basic slice patterns]: rust-2018/slice-patterns.html
[Default match bindings]: rust-2018/default-match-bindings.html
[Anonymous lifetimes]: rust-2018/the-anonymous-lifetime.html
[Default match bindings]: rust-2018/ownership-and-lifetimes/default-match-bindings.html
[Anonymous lifetimes]: rust-2018/ownership-and-lifetimes/the-anonymous-lifetime.html
[relnotes_1.26]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1260-2018-05-10
[`dyn Trait`]: rust-2018/dyn-trait-for-trait-objects.html
[`?` in `main`/tests]: rust-2018/question-mark-in-main-and-tests.html
[Module system path changes]: rust-2018/path-clarity.html
[`dyn Trait`]: rust-2018/trait-system/dyn-trait-for-trait-objects.html
[`?` in `main`/tests]: rust-2018/error-handling-and-panics/question-mark-in-main-and-tests.html
[Module system path changes]: rust-2018/module-system/path-clarity.html
[issue#44660]: https://github.com/rust-lang/rust/issues/44660
[Import macros via `use`]: rust-2018/macro-changes.html
[Import macros via `use`]: rust-2018/macros/macro-changes.html
[issue#35896]: https://github.com/rust-lang/rust/issues/35896
[issue#44524]: https://github.com/rust-lang/rust/issues/44524
[Lifetime elision in `impl`s]: rust-2018/lifetime-elision-in-impl.html
[Raw identifiers]: rust-2018/raw-identifiers.html
[Lifetime elision in `impl`s]: rust-2018/ownership-and-lifetimes/lifetime-elision-in-impl.html
[Raw identifiers]: rust-2018/module-system/raw-identifiers.html
[issue#48589]: https://github.com/rust-lang/rust/issues/48589
[nll_status]: http://smallcultfollowing.com/babysteps/blog/2018/06/15/mir-based-borrow-check-nll-status-update/
[`T: 'a` inference in `struct`s]: rust-2018/inference-in-structs.html
[`T: 'a` inference in `struct`s]: rust-2018/ownership-and-lifetimes/inference-in-structs.html
[issue#44493]: https://github.com/rust-lang/rust/issues/44493

| **Feature** | **Status** | **Minimum Edition** |
Expand Down

0 comments on commit 4b1ab87

Please sign in to comment.