Commit Graph

35550 Commits

Author SHA1 Message Date
James Miller
9115b319c3 Fix formatting issues 2014-12-18 15:28:34 +13:00
James Miller
fb3e871734 Add some documentation 2014-12-18 15:28:33 +13:00
James Miller
eee209d9e2 Only count nested returns when the outer return is reachable
This narrows the definition of nested returns such that only when the
outer return has a chance of being executed (due to the inner return
being conditional) do we mark the function as having nested returns.

Fixes #19684
2014-12-18 15:28:33 +13:00
Steve Klabnik
11a94f2ac7 remove l10n 2014-12-17 21:00:04 -05:00
bluss
5806519bd4 doc: Small changes to ownership guide.
Disambiguate maximally by using 'and' instead of '&' next to discussion
about references.

As a bonus, fix the spelling of the car too.
2014-12-18 02:01:37 +01:00
Nick Cameron
46eb72453f Propagate coercions through match expressions. 2014-12-18 13:48:05 +13:00
Ken Tossell
cbf80f3a68 Only try to install the doc directory if it exists.
If you configure with `--disable-docs`, the `doc` directory does not get generated, so
`cp -r doc dist/` fails when you `make dist{,-tar-bins,-doc}` or `make install`
2014-12-17 19:24:40 -05:00
Jorge Aparicio
1a996f93c3 Remove wrong &str + String and &[T] + Vec<T> implementations 2014-12-17 19:14:59 -05:00
Jake Goulding
1afa8acca8 Use #[deriving(Copy)] for InvariantLifetime 2014-12-17 19:04:15 -05:00
Jakub Bukaj
62d80df0c9 Add tests for E-needstest issues 2014-12-17 23:00:32 +01:00
bors
22a9f250b5 auto merge of #19958 : alexcrichton/rust/rollup, r=alexcrichton 2014-12-17 21:33:15 +00:00
Alex Crichton
5c98952409 Test fixes and rebase conflicts 2014-12-17 11:50:32 -08:00
Alex Crichton
76fbb5d527 rollup merge of #19947: csouth3/arc-borrowfrom
Closes #19937.
2014-12-17 11:50:31 -08:00
Alex Crichton
7ffbd8bad5 rollup merge of #19943: steveklabnik/doc_std_vec
Random improvements to the `std::vec` docs.
2014-12-17 11:50:31 -08:00
Alex Crichton
cbc3cf7a9e rollup merge of #19942: steveklabnik/doc_std_mem 2014-12-17 11:50:31 -08:00
Alex Crichton
1b9b647b07 rollup merge of #19940: phi-gamma/canonical-master
Signed-off-by: Philipp Gesang <phg@phi-gamma.net>
2014-12-17 11:50:31 -08:00
Alex Crichton
a7bb4795d3 rollup merge of #19935: cgaebel/hashmap-tuple-indexing
r? @Gankro @pczarn
2014-12-17 11:50:31 -08:00
Alex Crichton
42dbee098b rollup merge of #19930: cllns/lowercase-if
On the [guide site](http://doc.rust-lang.org/guide.html#if) I was confused when I got to "5 If". It looked like "5 LF" in lowercase.

Changing the if to lowercase solves this problem. I know titles are all capitalized, but I think it makes sense in this case to keep it lowercase, since `if` is a reserved word. I'd also be open to making it ```    `if`   ``` but I'm not sure how that would look on the site.

Before:
![screen shot 2014-12-16 at 12 58 01](https://cloud.githubusercontent.com/assets/632942/5458866/cb34c006-8523-11e4-89ef-3a3964bcedfc.png)
After:
![screen shot 2014-12-16 at 12 58 14](https://cloud.githubusercontent.com/assets/632942/5458865/cb33c444-8523-11e4-8d95-d377ed583ed6.png)
2014-12-17 11:50:30 -08:00
Alex Crichton
b56d4bf916 rollup merge of #19923: pnkfelix/fix-make-tags.emacs
Fix `make TAGS.emacs`.

@nikomatsakis has been complaining to me about this.  (I had not noticed since I drive `ctags` with a separate script.)

(Suitable for a rollup build.)
2014-12-17 11:50:30 -08:00
Alex Crichton
a02885e167 rollup merge of #19918: pnkfelix/ast-refactor-make-place-in-exprbox-an-option
This is to allow us to migrate away from UnUniq in a followup commit,
and thus unify the code paths related to all forms of `box`.
2014-12-17 11:50:30 -08:00
Alex Crichton
b496adaefb rollup merge of #19912: P1start/fn-formatting
This is to encourage the use of the sugary syntax instead of the `<>` syntax, which will not be usable post-1.0. Rustdoc [still uses the `<>` syntax](https://github.com/rust-lang/rust/issues/19909), so if a rustdoc wizard is looking for something to do, it would be nice to use the parenthetical syntax there as well. (I tried to patch rustdoc as well, but failed…)
2014-12-17 11:50:30 -08:00
Alex Crichton
1b929090ac rollup merge of #19911: mdinger/tuple_tests2
Fixes some tuple indexing deprecation warnings. Didn't test. Don't see how it could fail unless I need to modify a makefile somewhere...

r? @alexcrichton
2014-12-17 11:50:30 -08:00
Alex Crichton
cce3fc043e rollup merge of #19905: AaronFriel/patch-1
Was testing rustup on a very minimal Debian installation and got errors during the install process (error occurred in `install.sh` of the Rust nightly.)

Noticed that Rustup was downloading the i686 nightly instead of x86-64. Installing `file` fixed the problem, and this patch adds the probe to ensure file is installed before attempting to use it.

There may still be an issue with the i686 installation, I did not investigate further.
2014-12-17 11:50:30 -08:00
Alex Crichton
3369b33a20 rollup merge of #19902: alexcrichton/second-pass-mem
This commit stabilizes the `mem` and `default` modules of std.
2014-12-17 11:50:29 -08:00
Alex Crichton
cada943f14 rollup merge of #19895: jbranchaud/add-string-add-doctest 2014-12-17 11:50:29 -08:00
Alex Crichton
1f2a18c7a6 rollup merge of #19893: JacobEdelman/patch-1
FIxed the spelling of the word "specific".
2014-12-17 11:50:29 -08:00
Alex Crichton
4a7757038a rollup merge of #19892: pnkfelix/region-graphviz
Added -Z print-region-graph debugging option; produces graphviz visualization of region inference constraint graph.

Optionally uses environment variables `RUST_REGION_GRAPH=<path_template>` and `RUST_REGION_GRAPH_NODE=<node-id>` to select which file to output to and which AST node to print.
2014-12-17 11:50:29 -08:00
Alex Crichton
56fb9bc7ac rollup merge of #19889: FlaPer87/unboxed-closure
The fix just checks if the bound is `Copy` and returns an `Err` if so.

Closes: #19817

@nikomatsakis r?
2014-12-17 11:50:29 -08:00
Alex Crichton
1a05f956f8 rollup merge of #19887: alexcrichton/serialize-fn-mut
Relax some of the bounds on the decoder methods back to FnMut to help accomodate
some more flavorful variants of decoders which may need to run the closure more
than once when it, for example, attempts to find the first successful enum to
decode.
2014-12-17 11:50:28 -08:00
Alex Crichton
31e21613ee rollup merge of #19885: alexcrichton/char-escape
This changes the `escape_unicode` method on a `char` to use the new style of
unicode escapes in the language.

Closes #19811
Closes #19879
2014-12-17 11:50:28 -08:00
Alex Crichton
3315a3bf42 rollup merge of #19881: larroy/master
Now they trigger warnings.
2014-12-17 11:50:28 -08:00
Alex Crichton
c4c892d467 rollup merge of #19880: sanxiyn/assoc-resolve-lifetime
Fix #18790.
Fix #19862.
2014-12-17 11:50:28 -08:00
Alex Crichton
cd07efd264 rollup merge of #19873: drewm1980/master
In US english, "that" is used in restrictive clauses in place of
"which", and often affects the meaning of sentences.

In UK english and many dialects, no distinction is
made.

While Rust devs want to avoid unproductive pedanticism, it is worth at
least being uniform in documentation such as:

http://doc.rust-lang.org/std/iter/index.html

and also in cases where correct usage of US english clarifies the
sentence.
2014-12-17 11:50:28 -08:00
Alex Crichton
272f20394c rollup merge of #19871: pczarn/ring_buf-remove
Includes a fix for a small mistake in `fn insert` which is caught by test_insert for len=15, but not len=7.

Part of #18424

r? @Gankro @csherratt @huonw
2014-12-17 11:50:27 -08:00
Alex Crichton
64faa74d08 rollup merge of #19869: sfackler/free-stdin
r? @aturon
2014-12-17 11:50:27 -08:00
Alex Crichton
03e970f043 rollup merge of #19868: sourcefrog/master
The rendered form in http://doc.rust-lang.org/nightly/std/rand/struct.OsRng.html looks wrong.
2014-12-17 11:50:27 -08:00
Alex Crichton
67237a7917 rollup merge of #19860: japaric/copy-markers
Necessary to implement `Copy` on structs like this one:

``` rust
struct Slice<'a, T> {
    _contravariant: marker::ContravariantLifetime<'a>,
    _nosend: marker::NoSend,
    data: *const T,
    length: uint,
}
```

r? @alexcrichton
2014-12-17 11:50:27 -08:00
Alex Crichton
de0570de21 rollup merge of #19859: alexcrichton/flaky-test
This test would read with a timeout and then send a UDP message, expecting the
message to be received. The receiving port, however, was bound in the child
thread so it could be the case that the timeout and send happens before the
child thread runs. To remedy this we just bind the port before the child thread
runs, moving it into the child later on.

cc #19120
2014-12-17 11:50:27 -08:00
Alex Crichton
75a84f9a3e rollup merge of #19857: japaric/test-19129
Closes #19129
2014-12-17 11:50:27 -08:00
Alex Crichton
991bd049c9 rollup merge of #19856: iKevinY/faq-fixes
- Change long inline code to code block
- Replace double-hyphens with en dash
- Miscellaneous rephrasings for clarity

**Edit**: Trivial `commit --amend` to change the commit message slightly.
2014-12-17 11:50:26 -08:00
Alex Crichton
137a3dbffd rollup merge of #19849: alexcrichton/second-pass-option
This commit takes a second pass through the `std::option` module to fully
stabilize any lingering methods inside of it.

These items were made stable as-is

* Some
* None
* as_mut
* expect
* unwrap
* unwrap_or
* unwrap_or_else
* map
* map_or
* map_or_else
* and_then
* or_else
* unwrap_or_default
* Default implementation
* FromIterator implementation
* Copy implementation

These items were made stable with modifications

* iter - now returns a struct called Iter
* iter_mut - now returns a struct called IterMut
* into_iter - now returns a struct called IntoIter, Clone is never implemented

This is a breaking change due to the modifications to the names of the iterator
types returned. Code referencing the old names should updated to referencing the
newer names instead. This is also a breaking change due to the fact that
`IntoIter` no longer implements the `Clone` trait.

These items were explicitly not stabilized

* as_slice - waiting on indexing conventions
* as_mut_slice - waiting on conventions with as_slice as well
* cloned - the API was still just recently added
* ok_or - API remains experimental
* ok_or_else - API remains experimental

[breaking-change]
2014-12-17 11:50:26 -08:00
Alex Crichton
dea69e66b8 rollup merge of #19846: nicholasbishop/bishops_magical_intuition 2014-12-17 11:50:26 -08:00
Alex Crichton
f7cb5b6c20 rollup merge of #19845: jbranchaud/fix-indentation-in-ownership-guide
For reference, this is what the code example looks like before the change:

![screen shot 2014-12-14 at 12 12 58 pm](https://cloud.githubusercontent.com/assets/694063/5428475/ade24176-838a-11e4-870b-c7d4f55bc8d7.png)
2014-12-17 11:50:26 -08:00
Alex Crichton
924cd5a6d6 rollup merge of #19838: shepmaster/invariant-lifetime-copy
Both ContravariantLifetime and CovariantLifetime are marked as Copy,
so it makes sense for InvariantLifetime to be as well.
2014-12-17 11:50:26 -08:00
Alex Crichton
dbd68c70cd rollup merge of #19832: japaric/no-nocopy
r? @aturon / @alexcrichton
2014-12-17 11:50:25 -08:00
Alex Crichton
bdb1146181 rollup merge of #19831: luqmana/deriving-where
Fixes #19358.
2014-12-17 11:50:25 -08:00
Alex Crichton
823cd7a8d5 rollup merge of #19830: mchaput/patch-1
Error message has wrong spelling ("radix is to high").
2014-12-17 11:50:25 -08:00
Alex Crichton
f9ff55e4d0 rollup merge of #19827: japaric/clone-uc
closes #12677 (cc @Valloric)
cc #15294

r? @aturon / @alexcrichton

(Because of #19358 I had to move the struct bounds from the `where` clause into the parameter list)
2014-12-17 11:50:25 -08:00
Alex Crichton
b5302217f0 rollup merge of #19821: bkoropoff/issue-19791
Normalize late-bound regions in bare functions, stack closures, and traits and include them in the generated hash.

Closes #19791

r? @nikomatsakis (does my normalization make sense?)
cc @alexcrichton
2014-12-17 11:50:25 -08:00
Alex Crichton
be0c8fb507 rollup merge of #19820: alexcrichton/deprecate-some-more-libs
This commit deprecates a few more in-tree libs for their crates.io counterparts.
Note that this commit does not make use of the #[deprecated] tag to prevent
warnings from being generated for in-tree usage. Once #[unstable] warnings are
turned on then all external users will be warned to move.

These crates have all been duplicated in rust-lang/$crate repositories so
development can happen independently of the in-tree copies. We can explore at a
later date replacing the in-tree copies with the external copies, but at this
time the libraries have changed very little over the past few months so it's
unlikely for changes to be sent to both repos.

cc #19260
2014-12-17 11:50:24 -08:00