Commit Graph

3932 Commits

Author SHA1 Message Date
Postmodern
345626f088 Clarify wording in transmute example
* Change "four eights" to "four u8s"
* Change "a 32" to "a u32"
2016-05-19 13:12:11 -07:00
Steven Burns
519cc8280c Book: small improvement to a table to make it clearer 2016-05-19 11:05:13 -06:00
Manish Goregaokar
5928d49aa0 Rollup merge of #33721 - royalstream:royalstream-doc-highlights, r=Manishearth
Rust syntax coloring for some ignore, should-panic and no-run snippets.

In the book, some code blocks were missing the `rust` specifier which is needed for them to highlight correctly.
2016-05-19 21:21:07 +05:30
Manish Goregaokar
f6f5cdfcec Rollup merge of #33720 - mark-summerfield:patch-1, r=steveklabnik
Clarified that `let(mut x, y) =` only makes x mutable, not y

Closes #33716
2016-05-19 21:21:07 +05:30
Manish Goregaokar
e4f33d5ae7 Rollup merge of #33611 - vvanders:master, r=steveklabnik
Add a note about Higher-Ranked Trait Bounds in docs on Closures.

I hit a snag with lifetimes a few days ago and it wasn't until @birkenfeld pointed out Higher-Ranked Trait Bounds that I was able to solve the issue involving lifetimes on closure traits. This adds a small section in the book so that other users can find it.

r? @steveklabnik
2016-05-19 21:21:05 +05:30
Steven Burns
c9517189d7 Rust syntax coloring for some ignore, should-panic and no-run snippets. 2016-05-18 11:30:50 -06:00
mark-summerfield
98f1c35c77 Clarified that let(mut x, y) = only makes x mutable, not y 2016-05-18 17:43:22 +01:00
Hendrik Sollich
1d43497bda renamed last boolval to bool-val 2016-05-17 09:28:08 +02:00
Florian Berger
92abda02c4 Update link to license 2016-05-15 19:59:45 +03:00
Val Vanderschaegen
64feba03d7 Updated based on CR feedback. 2016-05-13 12:01:45 -07:00
Val Vanderschaegen
7da9ea0af4 Add a note about Higher-Ranked Trait Bounds in docs on Closures.
When using closures that take references with explicit lifetimes sometimes
it's required to use where F: for<..> ... syntax to express the right
lifetimes. This adds a quick note to the docs so other users can discover
it as well.
2016-05-12 18:56:20 -07:00
Guillaume Gomez
10f9f30139 Rollup merge of #33558 - bnewbold:trivial-book-tweaks, r=steveklabnik
trivial tweaks to documentation (book)

These are small things I found while reading through The Book. The `<hash>` and `panic!` lines are simply to improve readability, while I believe the proceeding/following distinction is a bug (but might be a English dialect distinction?).

I've read `rust/CONTRIBUTING`, i'm not sure if there is anything I need to do other than submit this PR.

r? @steveklabnik
2016-05-11 21:30:20 +02:00
bnewbold
8e8f3911aa trivial fixes to documentation (book) 2016-05-11 11:53:25 -04:00
Steve Klabnik
8c6796f0a7 Rollup merge of #33524 - briangreenery:briangreenery-fast-and-loose, r=steveklabnik
doc: Fix tiny typo in vec-alloc.md

Change `fast an loose` to `fast and loose`.
2016-05-11 09:27:44 -04:00
bors
80ec1b9f10 Auto merge of #33512 - birkenfeld:issue-25944, r=sanxiyn
rustdoc: remove artificial indentation of doctest code

The indentation makes the examples look nicer when printed (when is this done?), but breaks tests using multi-line string literals.

Fixes: #25944
2016-05-10 20:14:46 -07:00
Manish Goregaokar
35cc6b0c2c
Rollup merge of #33480 - birkenfeld:issue-33422, r=steveklabnik
book: fixup code in error handling tutorial

A few oversights happened while porting the example from docopt to getopts.  I retraced all the steps, fixing code and description as necessary.

Fixes: #33422
2016-05-09 14:59:40 -07:00
Brian Green
9d2c45d0e7 doc: Fix tiny typo in vec-alloc.md
Change `fast an loose` to `fast and loose`.
2016-05-09 14:28:42 -07:00
Georg Brandl
5606b42981 rustdoc: remove artificial indentation of doctest code
This makes the examples look nicer when printed (when is this
done?), but breaks tests using multi-line string literals.

Fixes: #25944
2016-05-09 22:46:40 +02:00
Amanieu d'Antras
04835ea5ec Add #[cfg(target_has_atomic)] to get atomic support for the current target 2016-05-09 13:31:47 +01:00
bors
ebe6da34ff Auto merge of #33414 - Nercury:master, r=alexcrichton
Add armv7-linux-androideabi target

This PR adds `armv7-linux-androideabi` target that matches `armeabi-v7a` Android ABI, ~~downscales `arm-linux-androideabi` target to match `armeabi` Android ABI~~ (TBD later if needed).

This should allow us to get the best performance from every [Android ABI level](http://developer.android.com/ndk/guides/abis.html).

Currently existing target `arm-linux-androideabi` started gaining features out of the supported range of [android `armeabi`](http://developer.android.com/ndk/guides/abis.html). While android compiler does not use a different target for later supported `armv7` architecture, it has distinct ABI name `armeabi-v7a`. We decided to add rust target `armv7-linux-androideabi` to match it.

Note that `NEON`, `VFPv3-D32`, and `ThumbEE` instruction sets are not added, because not all android devices are guaranteed to support all or some of these, and [their availability should be checked at runtime](http://developer.android.com/ndk/guides/abis.html#v7a).

~~This reduces performance of existing `arm-linux-androideabi` and may make it _much_ slower (we are talking more than order of magnitude in some random ad-hoc fp benchmark that I did).~~

Part of #33278.
2016-05-08 09:13:19 -07:00
Nerijus Arlauskas
b6fc4abe44 Add armv7-linux-androideabi target. 2016-05-07 13:29:57 +03:00
Georg Brandl
d75c079cde book: fixup code in error handling tutorial
A few oversights happened while porting the example from docopt to
getopts.  I retraced all the steps, fixing code and description as
necessary.

Fixes: #33422
2016-05-07 11:23:49 +02:00
Brian Anderson
2912bfb2b9 doc: Update reference with better description of target_env
The definition of this value recently changed slightly. It no
longer corresponds directly to the target triple.

Also shuffled things around to make the order of cfg descriptions more
logical and added text related them to the target triple.

cc #33403
2016-05-05 18:23:52 +00:00
cheercroaker
5635084e52 Bump copyright year in documentation footer 2016-05-03 19:57:23 +02:00
Isaac Andrade
ba6ce123ba Improve language. 2016-05-03 08:29:44 -07:00
Isaac Andrade
8f76f931c2 Add mention to RFC 940 in the Rust Reference.
- It also keeps mentions to RFCs consistent with the format "RFC XXX"
2016-05-02 16:15:46 -07:00
Stephen Mather
018c595574 doc/book/getting-started.md: Removed references to creating a new executable from 'Converting to Cargo'. 2016-05-01 19:45:38 +01:00
Stephen Mather
538098c7a4 doc/book/getting-started.md: Corrected spelling of 'Internet'. 2016-05-01 19:15:33 +01:00
Manish Goregaokar
3a0efffc9d Rollup merge of #33253 - ergenekonyigit:master, r=alexcrichton
rustdoc: fixed some RFCs

r? @alexcrichton
2016-04-29 19:17:58 +05:30
Alex Burka
56f24d7c19 add link to match section 2016-04-28 11:47:03 -04:00
Alex Burka
e1e4fbd2a2 s/than/instead of/ 2016-04-28 10:47:19 -04:00
Alex Burka
beec630863 "equal" -> "same type" 2016-04-28 10:32:08 -04:00
Steve Klabnik
b9dd8aa4c2 Rollup merge of #33234 - TomasHubelbauer:TomasHubelbauer-patch-1, r=GuillaumeGomez
Fix use of the `move` command in the Windows shell

`move` works both in `cmd` and in Powershell. `mv` works only in Powershell and the book says nothing about which shell is recommended so this could confuse beginners.

Closes #33219.
2016-04-28 09:51:44 -04:00
Steve Klabnik
32db236342 Rollup merge of #33095 - xogeny:xogeny-patch-1, r=steveklabnik
Tweaks to sections related to Ownership

Reading through these sections, I thought the intro text could be improved slightly.  So
here is a PR that addresses what was bugging me about it. :-)

Main issue was the wording of the opening sentence ("guide" is not clearly defined and the
wording was a bit too terse in my opinion).  I also took issue with the term "one of the most
unique".  Uniqueness is a `bool`, not an `f64`. :-)

r? @steveklabnik
2016-04-28 09:51:44 -04:00
Steve Klabnik
3c14116f64 Rollup merge of #32991 - kindlychung:patch-2, r=steveklabnik
make the borrowing example more concrete
2016-04-28 09:51:43 -04:00
Ergenekon Yigit
0e698ed2c6 update features RFC 2016-04-28 11:22:54 +03:00
Ergenekon Yigit
9ec051d3b3 update comments RFC and code snippets 2016-04-28 11:22:11 +03:00
Alex Burka
a14df5cc64 fix Point destructuring example 2016-04-28 01:20:54 -04:00
Alex Burka
993f13a2cf update documentation of tuple/unit structs
I made the "tuple structs are useless" editorializing a bit weaker and moved it to the end. Feel free to overrule me on that.

I also added an example of how to unpack a tuple struct with dot notation, because it came up on IRC.

`braced_empty_structs` is stable now, so I updated the example for unit-like structs to use that syntax. Should we show both ways?

cc @ubsan
r? @steveklabnik or @GuillameGomez
2016-04-27 23:29:49 -04:00
Tomáš Hübelbauer
e6b9760df2 Fix use of the move command in the Windows shell
`move` work both in `cmd` and in Powershell. `mv` works only in Powershell and the book says nothing about which shell is recommended so this could confuse beginners.

Closes #33219.
2016-04-27 10:56:35 +02:00
Kaiyin Zhong
10abb666e4 Update references-and-borrowing.md
add as 2nd example.
2016-04-26 17:40:59 +02:00
bors
253b7c1e1a Auto merge of #33120 - tclfs:patch-2, r=Manishearth
docs: Highlight a keyword
2016-04-24 20:17:08 -07:00
bors
91aea5cf87 Auto merge of #33163 - c4rlo:patch-2, r=Manishearth
subtyping.md: typo fix
2016-04-24 10:10:50 -07:00
bors
f01bb5ed24 Auto merge of #33092 - alexcrichton:rustbuild-docs, r=brson
rustbuild: Run all markdown documentation tests

This commit adds support to rustbuild to run all documentation tests, basically
running `rustdoc --test` over all our documentation.
2016-04-23 05:36:28 -07:00
c4rlo
abf00c65c2 subtyping.md: typo fix 2016-04-23 11:58:58 +01:00
Tang Chenglong
77145b3923 docs: Highlight a keyword 2016-04-21 09:53:30 +08:00
bors
a0c3259803 Auto merge of #32968 - alexcrichton:update-suport, r=brson
doc: Update our tier support

This modifies our listing of tiered platforms a few ways:

* All lists are alphabetized based on target now
* Lots of targets are moved up to "Tier 2" as we're gating on all these builds
  and official releases are provided (and installable via rustup).
* A few targets now list having a compiler + cargo now as well.

No more platforms have been moved up to Tier 1 at this time, however. The only
real candidate is ``x86_64-unknown-linux-musl`, but that's not *quite* to a tier
1 level of quality just yet so let's hold off for another release or so to iron
it out a bit.
2016-04-20 12:28:34 -07:00
Alex Crichton
ede8944ea7 rustbuild: Run all markdown documentation tests
This commit adds support to rustbuild to run all documentation tests, basically
running `rustdoc --test` over all our documentation. This also includes support
for running the error index tests.
2016-04-19 09:52:56 -07:00
Michael Tiller
f7ec6873cc Opening sentence was confusing and something cannot be "one of the most unique" (it either is or is not unique). 2016-04-19 12:39:31 -04:00
Michael Tiller
864eba884d Opening sentence was confusing and something cannot be "one of the most unique" (it either is or is not unique). 2016-04-19 12:38:39 -04:00
Michael Tiller
f252cfa2d4 Update ownership.md
Opening sentence was confusing and something cannot be "one of the most unique" (it either is or is not unique).
2016-04-19 12:34:33 -04:00
Steve Klabnik
31374d8030 Rollup merge of #33035 - jbranchaud:use-consistent-variable-names-in-ownership, r=GuillaumeGomez
Use `v` instead of `v1` for consistency

The code examples and previous paragraphs all use `v` and `v2`
2016-04-18 14:50:35 -04:00
Steve Klabnik
d3d9bd0e47 Rollup merge of #33007 - notriddle:master, r=steveklabnik
Do not use "bind" to refer to both referencing and to assignment

See https://users.rust-lang.org/t/difference-between-four-references/5406/7
2016-04-18 14:50:35 -04:00
Steve Klabnik
108a9e43e3 Rollup merge of #32906 - jocki84:jocki84-book-size, r=steveklabnik
Reword explanation of 'size' types.

Do not reference machine 'pointers' in explanation of 'size' types.

I think the number of elements that can be directly addressed is a fundamental feature of a machine architecture in its own right. The fact that it coincides with the ‘size’ of a pointer should be viewed as an ‘implementation detail’ ;)
2016-04-18 14:50:34 -04:00
jbranchaud
06e2e0e18d Use v instead of v1 for consistency
The code examples and previous paragraphs all use `v` and `v2`
2016-04-16 13:27:33 -05:00
Kaiyin Zhong
6c93c92ba7 Update casting-between-types.md 2016-04-16 18:04:27 +02:00
Michael Howell
63b508006d Do not use "bind" to refer to referencing and to variable binding. 2016-04-15 13:06:09 -07:00
Manish Goregaokar
eba80558d7
Rollup merge of #32973 - kindlychung:patch-1, r=steveklabnik
remove "#" symbols to make the code compile
2016-04-16 01:18:12 +05:30
Manish Goregaokar
50932f5c6a
Rollup merge of #32931 - deepak:gh-issue-32928-update-cargo-in-getting-started-doc, r=GuillaumeGomez
Doc fix: Update Cargo.toml in book/getting-started

The Cargo.toml mentioned in book/getting-started
is missing the section called `[dependencies]`

fixes https://github.com/rust-lang/rust/issues/32928
2016-04-16 01:18:04 +05:30
Kaiyin Zhong
a3f5d8aea1 make the borrowing example more concrete 2016-04-15 18:12:52 +02:00
Kaiyin Zhong
f91649144e remove "#" symbols to make the code compile 2016-04-15 00:51:20 +02:00
Alex Crichton
9e43649182 doc: Update our tier support
This modifies our listing of tiered platforms a few ways:

* All lists are alphabetized based on target now
* Lots of targets are moved up to "Tier 2" as we're gating on all these builds
  and official releases are provided (and installable via rustup).
* A few targets now list having a compiler + cargo now as well.

No more platforms have been moved up to Tier 1 at this time, however. The only
real candidate is ``x86_64-unknown-linux-musl`, but that's not *quite* to a tier
1 level of quality just yet so let's hold off for another release or so to iron
it out a bit.
2016-04-14 13:21:18 -07:00
Deepak Kannan
a40629d2c9 Doc fix: Do not mention next project in book/guessing-game
The next project refers to the dining-philosophers problem
27a1834ce5/src/doc/book/dining-philosophers.md

which was removed in
0c6c34de87

so removing reference to that project from book/guessing-game
2016-04-13 21:53:47 +05:30
Deepak Kannan
722faa024b Doc fix: Update Cargo.toml in book/getting-started
The Cargo.toml mentioned in book/getting-started
is missing the section called `[dependencies]`
2016-04-13 17:06:24 +05:30
jocki84
a548d4deb6 Update primitive-types.md
Replace "make for" by the slightly more accurate "account for".
2016-04-12 16:03:53 +02:00
jocki84
069b3a67f5 Update primitive-types.md
Simplify explanation and rephrase as per @GuillaumeGomez's suggestion.
2016-04-12 14:59:55 +02:00
Alec S
4d8fac078a Add data race to concurrency docs 2016-04-08 10:33:31 -05:00
bors
444a118a89 Auto merge of #32583 - arielb1:need-a-bound, r=nikomatsakis
Suggest adding a where-clause when that can help

Suggest adding a where-clause when there is an unmet trait-bound that can be satisfied if some type can implement it.

r? @nikomatsakis
2016-04-07 03:07:24 -07:00
Steve Klabnik
fce5901507 Rollup merge of #32679 - tclfs:patch-1, r=steveklabnik
Remove error description of `move`

(1) `x` can be used in main() after the call to spawn(). Because the variables follow normal move semantics, though the keyword `move` is used, and i32 implements `Copy`.
(2) I remove this sentence because the previous sentence gives the referrence to `move closures`, and more description of `move` may be redundant.
2016-04-06 12:12:08 -07:00
Steve Klabnik
be862ca5b8 Rollup merge of #32634 - varunvats:docs-fix, r=steveklabnik
Minor doc fixes in "Crates and Modules" and "Lifetimes" chapters

These commits fix a couple of (minor) issues in the _Crates and Modules_ and the _Lifetimes_ chapters of the book.

r? @steveklabnik
2016-04-06 12:12:07 -07:00
Ariel Ben-Yehuda
728d20f7cc improve error message 2016-04-05 20:58:58 +03:00
Ariel Ben-Yehuda
8a461d940c suggest adding a where-clause when that can help
suggest adding a where-clause when there is an unmet trait-bound that
can be satisfied if some type can implement it.
2016-04-05 20:58:58 +03:00
Varun Vats
a7d15ce6a6 Doc fix: list all module files Rust looks for.
1. In the English/Japanese phrases example in the "Multiple File
Crates" section of the "Crates and Modules" chapter, there are a total
of 8 module files that Rust looks for, while only four were
listed. This commit lists all 8 explicitly.
2. Title case fix.
2016-04-05 12:09:55 -05:00
Varun Vats
d841c15704 Doc fix: function takes argument by reference. 2016-04-05 12:09:55 -05:00
Manish Goregaokar
a447124963 Mention that it's not actually a data race
Conflicts:
	src/doc/book/concurrency.md
2016-04-05 02:49:16 +05:30
Tang Chenglong
a2f6d29420 Remove error description of move
(1) `x` can be used in main() after the call to spawn(). Because the variables follow normal move semantics, though the keyword `move` is used, and i32 implements `Copy`.
(2) I remove this sentence because the previous sentence gives the referrence to `move closures`, and more description of `move` may be redundant.
2016-04-02 21:03:59 +08:00
bors
f2285bdaf5 Auto merge of #32549 - respeccing:rust_backtrace_disabled, r=alexcrichton
allow RUST_BACKTRACE=0 to act as if unset

**UPDATE:** `RUST_BACKTRACE=0` to act as if the env. var is unset! (now `0` is what `disabled` was for, below)

When RUST_BACKTRACE is set to "disabled" then this acts as if the env. var is unset. So, either make sure `RUST_BACKTRACE` is not set OR set it to `disabled` to achieve the same effect.

Sample usage:

```bash
$ rustc -o /tmp/a.out -- <(echo 'fn main(){ panic!() }') && RUST_BACKTRACE=disabled /tmp/a.out
!! executing '/home/zazdxscf/build/1nonpkgs/rust/rust//x86_64-unknown-linux-gnu/stage2/bin//rustc' with args: '-o /tmp/a.out -- /dev/fd/63'
thread '<main>' panicked at 'explicit panic', /dev/fd/63:1
note: Run with `RUST_BACKTRACE=1` for a backtrace.

$ rustc -o /tmp/a.out -- <(echo 'fn main(){ panic!() }') && RUST_BACKTRACE=1 /tmp/a.out
!! executing '/home/zazdxscf/build/1nonpkgs/rust/rust//x86_64-unknown-linux-gnu/stage2/bin//rustc' with args: '-o /tmp/a.out -- /dev/fd/63'
thread '<main>' panicked at 'explicit panic', /dev/fd/63:1
stack backtrace:
   1:     0x55709e8148c0 - sys::backtrace::tracing:👿:write::h140f24a0cfc189b98Ru
   2:     0x55709e816a5b - panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::closure.45165
   3:     0x55709e8166e8 - panicking::default_hook::hed419823688cb82aXoA
   4:     0x55709e810fff - sys_common::unwind::begin_unwind_inner::hbb9642f6e212d56fmHt
   5:     0x55709e810513 - sys_common::unwind::begin_unwind::h16232867470678019594
   6:     0x55709e810489 - main::hb524f9576270962feaa
   7:     0x55709e816314 - sys_common::unwind::try::try_fn::h1274188004693518534
   8:     0x55709e813dfb - __rust_try
   9:     0x55709e815dab - rt::lang_start::h712b1cd650781872ahA
  10:     0x55709e810679 - main
  11:     0x7efd1026859f - __libc_start_main
  12:     0x55709e810348 - _start
  13:                0x0 - <unknown>
```

Some programs(eg. [vim's syntactic](https://github.com/scrooloose/syntastic) used by [rust.vim](https://github.com/rust-lang/rust.vim)) cannot unset the env. var RUST_BACKTRACE if it's already set(eg. in .bashrc) but [they can set it to some value](cb5533e159/system/Z575/OSes/gentoo/on_baremetal/filesystem_now/gentoo/home/zazdxscf/build/1nonpkgs/rust.vim/upd (L17)), and I needed to ensure the env. var is unset in order to avoid this issue: https://github.com/rust-lang/rust/issues/29293

**EDIT:** Sample usage 2:

```bash
$ export RUST_BACKTRACE=1

$ rustc -o /tmp/a.out -- <(echo 'fn main(){ panic!() }') && /tmp/a.out
!! executing '/home/zazdxscf/build/1nonpkgs/rust/rust//x86_64-unknown-linux-gnu/stage2/bin//rustc' with args: '-o /tmp/a.out -- /dev/fd/63'
thread '<main>' panicked at 'explicit panic', /dev/fd/63:1
stack backtrace:
   1:     0x55c2696738c0 - sys::backtrace::tracing:👿:write::h140f24a0cfc189b98Ru
   2:     0x55c269675a5b - panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::closure.45165
   3:     0x55c2696756e8 - panicking::default_hook::hed419823688cb82aXoA
   4:     0x55c26966ffff - sys_common::unwind::begin_unwind_inner::hbb9642f6e212d56fmHt
   5:     0x55c26966f513 - sys_common::unwind::begin_unwind::h16023941661074805588
   6:     0x55c26966f489 - main::hb524f9576270962feaa
   7:     0x55c269675314 - sys_common::unwind::try::try_fn::h1274188004693518534
   8:     0x55c269672dfb - __rust_try
   9:     0x55c269674dab - rt::lang_start::h712b1cd650781872ahA
  10:     0x55c26966f679 - main
  11:     0x7f593d58459f - __libc_start_main
  12:     0x55c26966f348 - _start
  13:                0x0 - <unknown>

$ rustc -o /tmp/a.out -- <(echo 'fn main(){ panic!() }') && RUST_BACKTRACE=disabled /tmp/a.out
!! executing '/home/zazdxscf/build/1nonpkgs/rust/rust//x86_64-unknown-linux-gnu/stage2/bin//rustc' with args: '-o /tmp/a.out -- /dev/fd/63'
thread '<main>' panicked at 'explicit panic', /dev/fd/63:1
note: Run with `RUST_BACKTRACE=1` for a backtrace.

```
2016-04-02 01:47:59 -07:00
Manish Goregaokar
70ae2a1cff Rollup merge of #32629 - mbrubeck:nomicon-version, r=steveklabnik
Update Rust version in the Rustonomicon Vec chapter

I verified that the final code compiles in Rust 1.9.0-nightly.

r? @steveklabnik
2016-04-01 18:44:48 +05:30
Manish Goregaokar
d7429f1378 Rollup merge of #32622 - tyoc213:rust-beginners, r=alexcrichton
Book: in beginner guide change irc channel #rust → #rust-beginners

I also would like to add the reference on the first README.md

Some like

```
 most popular channel is [#rust], a venue for general discussion about
-Rust, and a good place to ask for help.
+Rust. And a good place to ask for help would be [#rust-beginners].

 [IRC]: https://en.wikipedia.org/wiki/Internet_Relay_Chat
 [#rust]: irc://irc.mozilla.org/rust
+[#rust-beginners]: irc://irc.mozilla.org/rust-beginners
```

So In the first page would be the two options for #rust or #rust-beginners
2016-04-01 18:44:48 +05:30
Emanuel Czirai
e1d2eda7f3 allow RUST_BACKTRACE=0 to act as if unset
/# This is a combination of 16 commits.
/# The first commit's message is:
allow RUST_BACKTRACE=disabled to act as if unset

When RUST_BACKTRACE is set to "disabled" then this acts as if the env.
var is unset.

/# This is the 2nd commit message:

case insensitive "DiSaBLeD" RUST_BACKTRACE value

previously it expected a lowercase "disabled" to treat the env. var as
unset

/# This is the 3rd commit message:

RUST_BACKTRACE=0 acts as if unset

previously RUST_BACKTRACE=disabled was doing the same thing

/# This is the 4th commit message:

RUST_BACKTRACE=0|n|no|off acts as if unset

previously only RUST_BACKTRACE=0 acted as if RUST_BACKTRACE was unset
Now added more options (case-insensitive): 'n','no' and 'off'
eg. RUST_BACKTRACE=oFF

/# This is the 5th commit message:

DRY on the value of 2

DRY=don't repeat yourself
Because having to remember to keep the two places of '2' in sync is not
ideal, even though this is a simple enough case.

/# This is the 6th commit message:

Revert "DRY on the value of 2"

This reverts commit 95a0479d5cf72a2b2d9d21ec0bed2823ed213fef.

Nevermind this DRY on 2, because we already have a RY on 1,
besides the code is less readable this way...

/# This is the 7th commit message:

attempt to document unsetting RUST_BACKTRACE

/# This is the 8th commit message:

curb allocations when checking for RUST_BACKTRACE

this means we don't check for case-insensitivity anymore

/# This is the 9th commit message:

as decided, RUST_BACKTRACE=0 turns off backtrace

/# This is the 10th commit message:

RUST_TEST_NOCAPTURE=0 acts as if unset

(that is, capture is on)

Any other value acts as if nocapture is enabled (that is, capture is off)

/# This is the 11th commit message:

update other RUST_TEST_NOCAPTURE occurrences

apparently only one place needs updating

/# This is the 12th commit message:

update RUST_BACKTRACE in man page

/# This is the 13th commit message:

handle an occurrence of RUST_BACKTRACE

/# This is the 14th commit message:

ensure consistency with new rules for backtrace

/# This is the 15th commit message:

a more concise comment for RUST_TEST_NOCAPTURE

/# This is the 16th commit message:

update RUST_TEST_NOCAPTURE in man page
2016-03-31 23:02:59 +02:00
David AO Lozano
9094935b46 Using only one Mibbit link for access the two channels 2016-03-31 02:49:15 -06:00
David AO Lozano
c233f2ee29 Adding #rust-beginners to README and pointing the two channels on getting-started 2016-03-31 02:49:05 -06:00
David AO Lozano
90d7440f54 Misspelled beginners in one place 2016-03-31 02:48:50 -06:00
David AO Lozano
823f239ae5 Book: in beginner guide change irc channel #rust → #rust-beginners 2016-03-31 02:47:46 -06:00
Matt Brubeck
d93fb02a5e Update Rust version in the Rustonomicon Vec chapter
I verified that the final code compiles in Rust 1.9.0-nightly.
2016-03-30 16:59:38 -07:00
Manish Goregaokar
458fae709c Rollup merge of #32618 - ProgVal:patch-1, r=steveklabnik
Book: Fix phrasing: “an associated type” → “an object with an associated type”.

From what I understood, `graph` is the object from which we create a trait object, and the associated types are `Graph::N` and `Graph::E`.
2016-03-31 05:04:59 +05:30
Valentin Lorentz
b1b37384cd Book: Fix phrasing: “an associated type” → “a trait with an associated type”. 2016-03-30 19:34:53 +02:00
Steve Klabnik
45d633db26 Rollup merge of #32605 - tshepang:not-needed, r=Manishearth
doc: "mut" not needed for the examples
2016-03-30 10:16:54 -07:00
Christopher Serr
e9b1c3ccb5 Fix panic_fmt in the Book
While implementing panic_fmt for the GameCube I noticed that the parameters given to it were completely broken. Turns out that panic_fmt requires the C ABI to work correctly. This should be fixed in the documentation, so that others don't make the same mistake. Thanks to mbrubeck in the IRC for helping me figure this out.

Not specifying extern for lang_items correctly should potentially also be a compiler error.
2016-03-29 22:28:17 +02:00
Tshepang Lekhonkhobe
cd92e9f966 doc: "mut" not needed for the examples 2016-03-29 19:59:55 +02:00
bors
cad964a626 Auto merge of #32461 - mitaa:rdoc-anchors, r=alexcrichton
rustdoc: Correct anchor for links to associated trait items

fixes #28478

r? @alexcrichton
2016-03-28 18:34:50 -07:00
Steve Klabnik
9eea1d7494 Rollup merge of #32534 - xtian:patch-1, r=steveklabnik
Getting Started: "copy" -> "move"
2016-03-28 13:48:29 -04:00
Steve Klabnik
5e02fd3727 Rollup merge of #32509 - tclfs:patch-2, r=steveklabnik
docs: make some text changes on Section `Macros`

(1) In contrast to `that`, `so that` expresses `result` indicated by the sentence, not `reason`;
(2) `block` is an expression, and may be have an expression, so I add `optionally an expression` to make more precise;
~~(3) When I read here, I was confused with what `the child` referred to. After modification, it would be better.~~
2016-03-28 13:48:29 -04:00
Steve Klabnik
982d9591e1 Rollup merge of #32504 - tclfs:patch-1, r=steveklabnik
Docs: a tiny modification
2016-03-28 13:48:28 -04:00
Steve Klabnik
56bb7b64c8 Rollup merge of #32235 - fbergr:trailing_whitespace, r=sanxiyn
Remove trailing whitespace at the end of lines

According the rules of styling Rust code there should not be trailing whitespace at the end of lines or files. I thought that it might be good to remove trailing whitespace from other files also, if it does not break anything.
2016-03-28 13:48:28 -04:00
Andrew Horton
60a1aa7147 Update concurrency.md
Typo "las time" -> "last time"
2016-03-28 10:35:46 +01:00
Christian Wesselhoeft
dd08804f0a Getting Started: "copy" -> "move" 2016-03-27 12:15:31 -06:00
Manish Goregaokar
5954fce848 Improve concurrency chapter 2016-03-27 22:05:58 +05:30
Tang Chenglong
708c5d09d7 Update macros.md 2016-03-27 17:59:33 +08:00
mitaa
6a76872d71 Extend linkchecker with anchor checking
This adds checks to ensure that:
* link anchors refer to existing id's on the target page
* id's are unique within an html document
* page redirects are valid
2016-03-27 00:21:00 +01:00
Tang Chenglong
bbba872dde docs: make some text changes on Section Macros
(1) In contrast to `that`, `so that` expresses `result` indicated by the sentence, not `reason`;
(2) `block` is an expression, and may be have an expression, so I add `optional an expression` to make more precise;
(3) When I read here, I was confused with what `the child` referred to. After modification, it would be better.
2016-03-26 23:59:16 +08:00
Manish Goregaokar
2c4d039b76 Rollup merge of #32478 - xevix:docs/strings-str-unsized-types, r=steveklabnik
Add note on `str` being an unsized type in strings section of book

The book section on Rust strings mentions `&str` and `String` but does not address why `str` is not used directly. This adds a short blurb and a link to the unsized types chapter. The second draft of the book will go more in-depth on this, but this should help a bit for now. Thanks #rust for clarifying this point, and let me know if it needs rewording or different placement 😄.

CC @steveklabnik @Kimundi
2016-03-26 20:35:49 +05:30
Manish Goregaokar
4a1e19990f Rollup merge of #32383 - aidanhs:aphs-heap-move-guarantee, r=alexcrichton
Document heap allocation location guarantee

```
14:25 < aidanhs> is there any guarantee that boxes will not move the value on the heap when they are moved?
14:26 <@steveklabnik> aidanhs: ... i'm not sure if it's a guarantee, but it follows, generally
14:26 <@steveklabnik> aidanhs: moves mean memcpy, so you're memcpying the structure of the box itself, which is copying the pointer
14:26 <@steveklabnik> so the pointer won't be updated
14:26 <@steveklabnik> moves cannot do complex things like move the memory around on the heap
14:26 <@kmc> aidanhs: I would say it's guaranteed
14:27 < aidanhs> steveklabnik: yeah, that's what I was thinking, it'd be pretty strange for rust to do something, but I couldn't find any docs one way or the other
14:27 <@steveklabnik> kmc: aidanhs yeah, it's like a borderline thing that we don't explicitly guanratee but i think IS guaranteed by our other guarantees
14:27 <@steveklabnik> mostly that move == memcpy
14:28 < aidanhs> kmc: steveklabnik great thanks! would a PR to the rust reference along these lines be ok?
14:28 < jmesmon> aidanhs: I believe owning_ref has some discussion of that (stable references)
14:29 <@steveklabnik> aidanhs: i would probably take that, yeah
14:29 < aidanhs> jmesmon: thanks, I'll take a look at that
```
https://botbot.me/mozilla/rust/2016-02-22/?msg=60657619&page=18

r? @steveklabnik
2016-03-26 20:35:49 +05:30
Tang Chenglong
e469c79de8 Docs: a tiny modification 2016-03-26 21:18:08 +08:00
Alejandro Wainzinger
6ce63fb3f1 Add note on str being an unsized type in strings section of book. 2016-03-25 23:25:40 +09:00
Tang Chenglong
ceaf5dfdc1 Docs: some tiny corrections
TNT->`tnt`
firecracker->`firecracker`
2016-03-24 14:49:40 +08:00
Eduard-Mihai Burtescu
2e9b40f576 Rollup merge of #32443 - tclfs:patch-8, r=steveklabnik
Docs: Change "statements" to "expressions" on `match`

I apt to use `expressions` over `statements`, because `match` is a expression in essence, though it can become a statement when followed a semicolon.
2016-03-23 17:59:16 +02:00
Eduard-Mihai Burtescu
d7bf3d3284 Rollup merge of #32431 - nicholasf:tweak/improve-expression, r=steveklabnik
Simplifying some of the phrasing explaining lifetime elision

Just simplifying some of the language expressing what kind of inference Rust can and can't do on function signatures.
2016-03-23 17:59:15 +02:00
bors
26cfc269a0 Auto merge of #32410 - Ticki:master, r=eddyb
Add support for naked functions

See https://github.com/rust-lang/rfcs/pull/1201#issuecomment-199442239

This PR adds `#[naked]` for marking naked functions.
2016-03-23 03:49:02 -07:00
Tang Chenglong
ea9ae48662 Docs: Change "statements" to "expressions" on match
I apt to use `expressions` over `statements`, because `match` is a expression in essence, though it can become a statement when followed a semicolon.
2016-03-23 12:03:41 +08:00
nicholasf
45c72d5f5b Simplifying some of the phrasing explaining lifetime elision 2016-03-23 05:00:27 +11:00
Florian Berger
ccafdae9a1 Remove trailing whitespace at the end of lines 2016-03-22 19:31:39 +02:00
Ticki
1605ab377b Add support for naked functions 2016-03-21 21:01:08 +01:00
Steve Klabnik
6a3c7d5630 Rollup merge of #32397 - tclfs:patch-7, r=steveklabnik
docs: Make some changes in texts

In my understanding, the description is somehow inappropriate.
2016-03-21 11:46:53 -04:00
Steve Klabnik
078b288ebd Rollup merge of #32373 - tclfs:patch-5, r=steveklabnik
docs: Correct an  improper description

In the example, we made a immutable borrow to `println!`, not a mutable one.
2016-03-21 11:46:53 -04:00
Steve Klabnik
3c3b9ad76a Rollup merge of #32340 - Digipom:master, r=steveklabnik
Update of the book; Error handling, section on custom error types: we…

… should also show the changes to the `cause` method.

When I started creating my own error type, I found that we also have to update the cause method, otherwise we have a missing match branch.

It would also be nice to elaborate on the relationship and difference between the description() and fmt() method, but that should be done by someone with more experience with them. :)
2016-03-21 11:46:52 -04:00
Steve Klabnik
0694d63674 Rollup merge of #32339 - tclfs:patch-4, r=apasel422
docs: make some tiny modification about spelling

I think it would be better after modification.
2016-03-21 11:46:52 -04:00
Tang Chenglong
a5d9057ca7 docs: Make some changes in texts
In my understanding, the description is somehow inappropriate.
2016-03-21 21:00:04 +08:00
Aidan Hobson Sayers
bb43f580e5 Document heap allocation location guarantee 2016-03-20 23:12:20 +00:00
Tang Chenglong
06d8b21372 docs: Correct an improper description
In the example, we made a immutable borrow to `println!`, not a mutable one.
2016-03-20 21:24:46 +08:00
Eduard-Mihai Burtescu
d5dceba8fa Rollup merge of #32327 - toddlucas:master, r=apasel422
Minor phrasing adjustment to book references-and-borrowing
2016-03-19 12:30:01 +02:00
Eduard-Mihai Burtescu
cb9b1b26c0 Rollup merge of #32316 - tclfs:patch-3, r=steveklabnik
docs: `let` introduces a statement

I changes *expression* to *statement* to make more accurate, because in Rust, `let` introduces a declaration statement.
2016-03-19 12:30:01 +02:00
Eduard-Mihai Burtescu
33c28b45c8 Rollup merge of #32288 - tclfs:patch-2, r=apasel422
docs: One typo

I think it's a mistake of spelling.
2016-03-19 12:30:00 +02:00
Kevin Brothaler
8f99ad2a2a Update of the book; Error handling, section on custom error types: we should also show the changes to the cause method. 2016-03-18 11:40:45 -04:00
Tang Chenglong
2318e9fbe2 docs: Make some tiny modification about spelling 2016-03-18 23:29:12 +08:00
Todd Lucas
667d1c67e2 Minor phrasing adjustment 2016-03-17 20:14:05 -07:00
Tang Chenglong
79244c3a6b let introduces a statement
I changes *expression* to *statement* to make more accurate, because in Rust, `let` introduces a declaration statement.
2016-03-18 01:17:19 +08:00
Tang Chenglong
01d76099f2 docs: One typo
I think it's a mistake of spelling.
2016-03-16 23:45:28 +08:00
Tang Chenglong
94ee40a5d4 FreeBSD has already supported Cargo
Both Packages and Ports of FreeBSD have Cargo in present.
2016-03-16 00:15:40 +08:00
Manish Goregaokar
2e21ff1a9d Rollup merge of #32218 - cantino:minor_book_typo_fixes, r=steveklabnik
Fix minor typos in doc.rust-lang.org/book

I've made a few typo and grammar fixes as I've been working through the book.
2016-03-13 19:33:27 +05:30
Andrew Cantino
56ab2a1cde Fix minor typos in doc.rust-lang.org/book 2016-03-12 12:35:34 -08:00
Manish Goregaokar
744ffed25a Rollup merge of #32178 - naltun:patch-1, r=steveklabnik
Update getting-started.md

In `rustc 1.7.0` the message that is displayed is now `Rust is ready to roll.`
2016-03-12 02:41:26 +05:30
bors
aeb85a9533 Auto merge of #32133 - alexcrichton:linkchecker, r=brson
Add a link validator to rustbuild

This commit was originally targeted at just adding a link checking script to the rustbuild system. This ended up snowballing a bit to extend rustbuild to be amenable to various tools we have as part of the build system in general.

There's a new `src/tools` directory which has a number of scripts/programs that are purely intended to be used as part of the build system and CI of this repository. This is currently inhabited by rustbook, the error index generator, and a new linkchecker script added as part of this PR. I suspect that more tools like compiletest, tidy scripts, snapshot scripts, etc will migrate their way into this directory over time.

The commit which adds the error index generator shows the steps necessary to add new tools to the build system, namely:

1. New steps are defined for building the tool and running the tool
2. The dependencies are configured
3. The steps are implemented

In terms of the link checker, these commits do a few things:

* A new `src/tools/linkchecker` script is added. This will read an entire documentation tree looking for broken relative links (HTTP links aren't followed yet).
* A large number of broken links throughout the documentation were fixed. Many of these were just broken when viewed from core as opposed to std, but were easily fixed.
* A few rustdoc bugs here and there were fixed
2016-03-11 04:38:04 -08:00
Noah
4d476693f0 Update getting-started.md
In `rustc 1.7.0` the message that is displayed is now `Rust is ready to roll.`
2016-03-10 11:34:42 -06:00
Steve Klabnik
4f8d0291f3 Rollup merge of #32150 - steveklabnik:gh20213, r=bluss
Remove inaccurate claim about inline assembly

It's not like GCC's.

Fixes #20213
2016-03-10 14:01:54 +03:00
Steve Klabnik
fc9bc7ac3b Rollup merge of #32149 - steveklabnik:gh31628, r=bluss
Add other primitive types to the reference

Fixes #31628
2016-03-10 14:01:54 +03:00
Steve Klabnik
c5ec055d1f Rollup merge of #32148 - steveklabnik:gh31912, r=apasel422
Small grammar fix in Guessing Game

When it was Option.expect(), there was an .ok().expect(), but now that it uses Result.expect(), there's only one method, not two.

Fixes #31912
2016-03-10 14:01:54 +03:00
Steve Klabnik
3820d38e90 Rollup merge of #32125 - pyfisch:patch-2, r=steveklabnik
Remove final note from testing chapter.

The information that documentation tests cannot be run in binary crates is already given at the beginning of the section.
2016-03-10 14:01:53 +03:00
Steve Klabnik
78484696fc Remove inaccurate claim about inline assembly
It's not like GCC's.

Fixes #20213
2016-03-09 03:52:35 -05:00
Steve Klabnik
aaca3175ba Add other primitive types to the reference
Fixes #31628
2016-03-09 03:42:36 -05:00
Steve Klabnik
0f426aa916 Small grammar fix in Guessing Game
When it was Option.expect(), there was an .ok().expect(), but now that it uses Result.expect(), there's only one method, not two.

Fixes #31912
2016-03-09 03:37:19 -05:00
Alex Crichton
73db76015e doc: Fix a bunch of broken links
A few categories:

* Links into compiler docs were just all removed as we're not generating
  compiler docs.
* Move up one more level to forcibly go to std docs to fix inlined documentation
  across the facade crates.
2016-03-08 13:44:14 -08:00
Steve Klabnik
33fe4d10fc Rollup merge of #32115 - tclfs:patch-1, r=apasel422
Update a spelling inconsistency

L26: "zero cost" -> "zero-cost"
2016-03-08 21:44:12 +03:00
Steve Klabnik
bf9610ddbb Rollup merge of #32103 - timmontague:patch-1, r=alexcrichton
Fixed link in ownership documentation

Changed "[vector]" to a link to the vector documentation.
2016-03-08 21:44:11 +03:00
Steve Klabnik
e35e5c434b Rollup merge of #32092 - bluss:operator-overload, r=steveklabnik
Update syntax index with OpAssign traits

book: Update syntax index with OpAssign traits

The traits are stable from Rust 1.8.
2016-03-08 21:44:11 +03:00
Steve Klabnik
86fb351059 Rollup merge of #32083 - nodakai:reference-scoped-enum-alias, r=nikomatsakis
reference.md: clarify the limitation of type alias on an enum

Tentatively define the current behavior as the specification.

Cf. rust-lang/rust#26264, rust-lang/rust#28556, rust-lang/rust#30936
2016-03-08 21:44:11 +03:00
Steve Klabnik
be506b256f Rollup merge of #31772 - nodakai:patch-1, r=steveklabnik
Clarify the semantics of enum discriminants

cf. https://doc.rust-lang.org/error-index.html#E0082

> The default type for enum discriminants is isize, but it can be adjusted by adding the repr attribute to the enum declaration.

It would be great if anyone could check my English.
2016-03-08 21:44:10 +03:00
Pyfisch
d7e406eab8 Remove final note from testing chapter.
The information that documentation tests cannot be run in binary crates is already given at the beginning of the section.
2016-03-08 19:33:27 +01:00
Tang Chenglong
dc829e2b93 Update a spelling inconsistency
L26: "zero cost" -> "zero-cost"
2016-03-08 13:42:05 +08:00
NODA, Kai
790178f6e5
reference.md: clarify the limitation of type alias on an enum
Cf. rust-lang/rust#26264

Signed-off-by: NODA, Kai <nodakai@gmail.com>
2016-03-08 08:46:49 +08:00
Tim Montague
150b1c9217 Fixed link
Changed "[vector]" to a link to the vector documentation.
2016-03-07 10:30:25 -08:00
Ulrik Sverdrup
63933375e8 book: Update syntax index with OpAssign traits 2016-03-07 05:17:27 +01:00
NODA, Kai
559683cded
reference.md: clarify negation.
Signed-off-by: NODA, Kai <nodakai@gmail.com>
2016-03-07 04:42:14 +08:00
Kai Noda
969d027e35
Clarify the semantics of enum discriminants
cf. https://doc.rust-lang.org/error-index.html#E0082
2016-03-07 02:45:10 +08:00
bors
8484831d29 Auto merge of #30884 - durka:inclusive-ranges, r=aturon
This PR implements [RFC 1192](https://github.com/rust-lang/rfcs/blob/master/text/1192-inclusive-ranges.md), which is triple-dot syntax for inclusive range expressions. The new stuff is behind two feature gates (one for the syntax and one for the std::ops types). This replaces the deprecated functionality in std::iter. Along the way I simplified the desugaring for all ranges.

This is my first contribution to rust which changes more than one character outside of a test or comment, so please review carefully! Some of the individual commit messages have more of my notes. Also thanks for putting up with my dumb questions in #rust-internals.

- For implementing `std::ops::RangeInclusive`, I took @Stebalien's suggestion from https://github.com/rust-lang/rfcs/pull/1192#issuecomment-137864421. It seemed to me to make the implementation easier and increase type safety. If that stands, the RFC should be amended to avoid confusion.
- I also kind of like @glaebhoerl's [idea](https://github.com/rust-lang/rfcs/pull/1254#issuecomment-147815299), which is unified inclusive/exclusive range syntax something like `x>..=y`. We can experiment with this while everything is behind a feature gate.
- There are a couple of FIXMEs left (see the last commit). I didn't know what to do about `RangeArgument` and I haven't added `Index` impls yet. Those should be discussed/finished before merging.

cc @Gankro since you [complained](https://www.reddit.com/r/rust/comments/3xkfro/what_happened_to_inclusive_ranges/cy5j0yq)
cc #27777 #30877 rust-lang/rust#1192 rust-lang/rfcs#1254
relevant to #28237 (tracking issue)
2016-03-06 07:16:41 +00:00
Steve Klabnik
55bc488db4 Rollup merge of #32002 - srinivasreddy:vector_doc, r=Manishearth
Issue here : https://github.com/rust-lang/rust/issues/31991
2016-03-04 14:17:28 -05:00
srinivasreddy
d2df5514c0 added ignore 2016-03-03 21:54:21 +05:30
srinivasreddy
2dc723de9a made print message similar across two loops 2016-03-02 20:42:26 +05:30
srinivasreddy
a3c9afa841 addressed review comments - grammar corrections, space additions 2016-03-02 20:35:30 +05:30
srinivasreddy
9bf73d24d0 Explained the difference between ownership iteration and reference iteration 2016-03-02 09:36:30 +05:30
Evan
cf01fb6836 Make book ordering more natural
Vectors come up in sections dedicated to ownership with the assumption that we know something about it but we haven't seen it yet. On the other hand, you need not know anything about ownership or lifetimes to understand the basics of vectors covered in the vector section of the book. Additionally, by moving it where it is there is a natural progression from loops to an iterative type which discusses for loops. This kind of interaction is generally better for learning.

I would like to have moved the struct section as well but I'm less confident about how to handle it since the ownership sections discuss structs and the structs section talks about mutable borrow.
2016-03-01 19:50:11 -05:00
Steve Klabnik
0ee1b99288 Rollup merge of #31987 - gcatlin:patch-1, r=steveklabnik
r? @steveklabnik
2016-03-01 13:39:42 -05:00
Steve Klabnik
c98c1b777f Rollup merge of #31984 - xaocon:master, r=steveklabnik
Had a discussion at https://www.reddit.com/r/rust/comments/488mjv/borrowing_or_returning_ownership/ about how an example could be worded more clearly and tried to take my recommendation and expand upon it with further information provided in the post.
2016-03-01 13:39:42 -05:00
Geoff Catlin
dcb92abbe1 grammar: 'fewer' instead of 'less' 2016-03-01 08:42:34 -05:00
bors
a93bb135c8 Auto merge of #31713 - alexcrichton:rustbuild-docs, r=brson
This commit implements documentation generation of the nomicon, the book, the
style guide, and the standalone docs. New steps were added for each one as well
as appropriate makefile targets for each one as well.
2016-03-01 04:44:56 +00:00
Evan
ae9121bb6d Clarified the details of a borrowing example.
Had a discussion at https://www.reddit.com/r/rust/comments/488mjv/borrowing_or_returning_ownership/ about how an example could be worded more clearly and tried to take my recommendation and expand upon it with further information provided in the post.
2016-02-29 23:22:30 -05:00
Alex Crichton
b643782a10 std: Stabilize APIs for the 1.8 release
This commit is the result of the FCPs ending for the 1.8 release cycle for both
the libs and the lang suteams. The full list of changes are:

Stabilized

* `braced_empty_structs`
* `augmented_assignments`
* `str::encode_utf16` - renamed from `utf16_units`
* `str::EncodeUtf16` - renamed from `Utf16Units`
* `Ref::map`
* `RefMut::map`
* `ptr::drop_in_place`
* `time::Instant`
* `time::SystemTime`
* `{Instant,SystemTime}::now`
* `{Instant,SystemTime}::duration_since` - renamed from `duration_from_earlier`
* `{Instant,SystemTime}::elapsed`
* Various `Add`/`Sub` impls for `Time` and `SystemTime`
* `SystemTimeError`
* `SystemTimeError::duration`
* Various impls for `SystemTimeError`
* `UNIX_EPOCH`
* `ops::{Add,Sub,Mul,Div,Rem,BitAnd,BitOr,BitXor,Shl,Shr}Assign`

Deprecated

* Scoped TLS (the `scoped_thread_local!` macro)
* `Ref::filter_map`
* `RefMut::filter_map`
* `RwLockReadGuard::map`
* `RwLockWriteGuard::map`
* `Condvar::wait_timeout_with`

Closes #27714
Closes #27715
Closes #27746
Closes #27748
Closes #27908
Closes #29866
2016-02-29 09:05:33 -08:00
bors
504ca6f422 Auto merge of #31958 - teoryn:patch-3, r=nagisa 2016-02-29 11:12:15 +00:00
bors
776a0f2cee Auto merge of #31960 - aidanhs:aphs-tweak-aliasing-docs, r=Manishearth
See https://doc.rust-lang.org/book/unsafe.html#what-does-safe-mean for the book version of these points which already contain the T.
2016-02-29 05:03:32 +00:00
Aidan Hobson Sayers
246401367d Add the 'T' present in the rust book 2016-02-29 02:50:18 +00:00
Kevin Stock
7f59e069e8 Fix typo (an Result) 2016-02-28 20:48:17 -05:00
Kevin Stock
251f41905a Fix typo (!#[no_std]) 2016-02-28 20:46:56 -05:00
bors
d56677a187 Auto merge of #31931 - Luke-Nukem:master, r=steveklabnik
Refinement of paragraph referenced by [this issue](https://github.com/rust-lang/rust/issues/31927).

The paragraph in question had been adjusted already, but I've made some further clarifications which should help with readability and not leave the reader any `dangling pointers`.
2016-02-27 20:26:59 +00:00
Kevin Stock
9eda98a587 Resolve ambiguous documentation
See http://www.ietf.org/rfc/rfc2119.txt
2016-02-27 08:26:42 -05:00
Alex Burka
15a8a296b7 document inclusive range syntax 2016-02-27 02:01:41 -05:00
Manish Goregaokar
35b30424df Rollup merge of #31909 - benaryorg:patch-2, r=Manishearth
`continue` expression's description mentioned `break` instead of `continue`
2016-02-27 10:52:00 +05:30
Luke Jones
edd5f3328b Refinement of paragraph referenced by [this
issue](https://github.com/rust-lang/rust/issues/31927)
2016-02-27 14:41:38 +13:00
Manish Goregaokar
903798dce0 Rollup merge of #31883 - birkenfeld:doc-null-escape, r=bluss
It appears in the examples, but is not covered by any of the cases
in the prose description.
2016-02-26 17:03:40 +05:30
Katze
7a549598bb
documentation fix
`continue` expression's description mentioned `break` instead of `continue`

Signed-off-by: benaryorg <binary@benary.org>
2016-02-26 09:58:01 +01:00
Manish Goregaokar
4cfa2ee2f1 Rollup merge of #31827 - teoryn:patch-1, r=brson 2016-02-25 15:06:06 +05:30
Georg Brandl
d472b69da1 Document the null-char/null-byte escape in the reference
It appears in the examples, but is not covered by any of the cases
in the prose description.
2016-02-25 08:30:42 +01:00
Manish Goregaokar
b660ca59ff Rollup merge of #31870 - ivan:filter-explain, r=steveklabnik
As a Rust newbie, I found the book's explanation for why the `filter` closure gets a reference very confusing, and tried to figure out why `filter` is somehow less consumptive than `map` -- but it isn't; that's controlled by `iter`/`into_iter`.  I flailed around for a while until @habnabit explained it to me, and in retrospect it is quite obvious :-)
2016-02-25 04:21:11 +05:30
Manish Goregaokar
a834cd1b70 Rollup merge of #31868 - fhahn:capitalize-Rust, r=steveklabnik 2016-02-25 04:21:11 +05:30
Manish Goregaokar
f28677506c Rollup merge of #31863 - matklad:clarify-reference, r=steveklabnik
Reference implied that use declarations may appear *only* at the top of blocks and modules, but it is not the case, and the following is valid:

```Rust
fn foo() {
    let x = 92;
    use baz::bar;
}
```

r? @steveklabnik
2016-02-25 04:21:11 +05:30
Manish Goregaokar
e928297a3b Rollup merge of #31677 - ivan:doc-vtable, r=steveklabnik
I sure hope this fix is right

cc @steveklabnik
2016-02-25 04:21:10 +05:30
Ivan Kozik
7042c8ef8d book: Explain better why the filter closure gets a reference 2016-02-24 20:09:01 +00:00
Florian Hahn
145190bd2a Capitalize some occurences of Rust in documentation 2016-02-24 19:56:28 +01:00
Aleksey Kladov
397ab315e7 reference: clarify use declaration location 2016-02-24 19:13:31 +03:00
Kevin Stock
b49ce1a599 Fix warn(unused_mut) in example 2016-02-22 22:37:02 -05:00
Chad Shaffer
6e985934bd Fix number of lines and methods in guessing game 2016-02-20 17:00:54 -08:00
Ivan Kozik
58f0d72d90 reference: vtable entries: copy @nikomatsakis's wording 2016-02-18 19:17:09 +00:00
Steve Klabnik
9f0e39ba16 Rollup merge of #31565 - SDX2000:docfixes4, r=steveklabnik
See title and diff for more information.
2016-02-17 18:14:35 -05:00
Sandeep Datta
1536195ce6 Made v2 mutable so that we can actually truncate it. 2016-02-17 20:47:24 +05:30
Alex Crichton
848e78550c rustbuild: Add rustbook/standalone doc support
This commit implements documentation generation of the nomicon, the book, the
style guide, and the standalone docs. New steps were added for each one as well
as appropriate makefile targets for each one as well.
2016-02-16 10:39:55 -08:00
Dirk Gadsden
f2bea1cb70 Clarify contiguous memory array structure of vectors in documentation
Closes #31554.

Contributes to #29380.
2016-02-16 04:10:30 +05:30
Ivan Kozik
347a257a47 reference: vtable entries are resolved at runtime 2016-02-15 15:53:55 +00:00
Steve Klabnik
fb09a441c6 Rollup merge of #31658 - felgru:master, r=steveklabnik
In the Rust code above this block of compiler output, the function is called print_sum, so use the same function name in the error message.
2016-02-14 18:02:32 -05:00
Felix Gruber
3eebec697c doc: fix compiler output
In the Rust code above, the function is called print_sum, so use the
same function name in the error message.
2016-02-14 20:50:12 +01:00
fbergr
310ab5ea74 doc: Remove trailing whitespace 2016-02-14 14:31:20 +02:00
Manish Goregaokar
b34e625faf Rollup merge of #31638 - rkruppe:rm-tex, r=alexcrichton
This file is unused since #27789
2016-02-14 05:06:36 +05:30