]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoRun rustfmt on librand/distributions/normal.rs
Joseph Caudle [Sat, 10 Oct 2015 04:01:57 +0000 (00:01 -0400)]
Run rustfmt on librand/distributions/normal.rs

8 years agoAuto merge of #28861 - pnkfelix:fsk-nonparam-dropck-issue28498, r=arielb1
bors [Sat, 10 Oct 2015 00:39:29 +0000 (00:39 +0000)]
Auto merge of #28861 - pnkfelix:fsk-nonparam-dropck-issue28498, r=arielb1

implement RFC 1238: nonparametric dropck.

cc #28498

cc @nikomatsakis

8 years agoAuto merge of #28049 - steveklabnik:doc_write, r=alexcrichton
bors [Fri, 9 Oct 2015 22:15:24 +0000 (22:15 +0000)]
Auto merge of #28049 - steveklabnik:doc_write, r=alexcrichton

8 years agoAuto merge of #28926 - DanielKeep:syntax-index, r=steveklabnik
bors [Fri, 9 Oct 2015 19:28:43 +0000 (19:28 +0000)]
Auto merge of #28926 - DanielKeep:syntax-index, r=steveklabnik

The intent with this chapter is to have a central place where users can
go to find out what a random bit of syntax means, be it a keyword,
symbol, or some unusual bit of composite syntax (like `for <...>`).  This
should be useful both for new users (who may not know what to call this
weird `'blah` thing), and for experienced users (who may just wish to
link someone to the appropriate section on `Trait + Trait` bounds).

Where possible, entries have been linked to an appropriate section of
the book which explains the syntax.  This was not possible in all cases.
If an entry is missing links, that's because I was unable to *find*
anything appropriate to link to.

This commit should include all stable keywords, operators and symbols,
as well as a selection of potentially confusing or unusual syntax.

8 years agoImprove docs for write!/writeln! macros
Steve Klabnik [Thu, 27 Aug 2015 18:24:53 +0000 (14:24 -0400)]
Improve docs for write!/writeln! macros

8 years agoAuto merge of #28929 - pnkfelix:expand-legal-cycles-test, r=alexcrichton
bors [Fri, 9 Oct 2015 17:07:48 +0000 (17:07 +0000)]
Auto merge of #28929 - pnkfelix:expand-legal-cycles-test, r=alexcrichton

Major revision to the dropck_legal_cycles test.

1. Added big comment block explaining the test framework.

2. Added tests exericising Rc and Arc. This was inspired by a comment
   from eefriedman on PR #28861.

3. Made the cycle-detection not issue false-positives on acyclic dags.

   Doing this efficiently required revising the framework; instead of
   visiting all children (i.e. doing a traversal), now each test is
   responsible for supplying the path that will act as a witness to
   the cycle.

   Luckily for me, all of the pre-existing tests worked with a trivial
   path built from "always tke your first left", but new tests I added
   did require other input paths (i.e., "first turn right, then left".

   (The path representation is a bit-string and its branches are
    n-ary, not word phrases and binary branches as you might think
    from the outline above.)

cc PR #27185

8 years agoreview comment: further refinement of comment above `fn is_adt_dtorck`.
Felix S. Klock II [Fri, 9 Oct 2015 16:42:14 +0000 (18:42 +0200)]
review comment: further refinement of comment above `fn is_adt_dtorck`.

8 years agoAdded the param-blindness attribute to `Rc` and `Arc`.
Felix S. Klock II [Fri, 9 Oct 2015 16:03:31 +0000 (18:03 +0200)]
Added the param-blindness attribute to `Rc` and `Arc`.

This was proven necessary after I added `Rc` and `Arc` to the rpass
test `dropck_legal_cycles.rs`; see PR #28929.

8 years agoMajor revision to the dropck_legal_cycles test.
Felix S. Klock II [Fri, 9 Oct 2015 16:02:37 +0000 (18:02 +0200)]
Major revision to the dropck_legal_cycles test.

1. Added big comment block explaining the test framework.

2. Added tests exericising Rc and Arc. This was inspired by a comment
   from eefriedman on PR #28861.

3. Made the cycle-detection not issue false-positives on acyclic dags.

   Doing this efficiently required revising the framework; instead of
   visiting all children (i.e. doing a traversal), now each test is
   responsible for supplying the path that will act as a witness to
   the cycle.

   Luckily for me, all of the pre-existing tests worked with a trivial
   path built from "always tke your first left", but new tests I added
   did require other input paths (i.e., "first turn right, then left".

   (The path representation is a bit-string and its branches are
    n-ary, not word phrases and binary branches as you might think
    from the outline above.)

8 years agoAuto merge of #27897 - sfackler:cursor-box-slice, r=alexcrichton
bors [Fri, 9 Oct 2015 13:07:07 +0000 (13:07 +0000)]
Auto merge of #27897 - sfackler:cursor-box-slice, r=alexcrichton

8 years agoImplement Read, BufRead, Write and Seek for Cursor<Box<[u8]>>
Steven Fackler [Wed, 19 Aug 2015 06:02:49 +0000 (23:02 -0700)]
Implement Read, BufRead, Write and Seek for Cursor<Box<[u8]>>

8 years agoreview comment: point out that the dropck analysis is now trivial.
Felix S. Klock II [Fri, 9 Oct 2015 12:08:06 +0000 (14:08 +0200)]
review comment: point out that the dropck analysis is now trivial.

8 years agoCorrections to syntax index.
Daniel Keep [Fri, 9 Oct 2015 12:06:20 +0000 (23:06 +1100)]
Corrections to syntax index.

* removed reference to struct fields from `mut` description.
* changed `..` pattern example to not be syntactically bogus.
* changed `@` pattern example for similar reasons.

(Thanks petrochenkov)

8 years agorevise cfail test, removing ugeh attribute that was erroneously cut-and-pasted into it.
Felix S. Klock II [Fri, 9 Oct 2015 11:30:08 +0000 (13:30 +0200)]
revise cfail test, removing ugeh attribute that was erroneously cut-and-pasted into it.

8 years agoExpanded entries for generics.
Daniel Keep [Fri, 9 Oct 2015 11:19:56 +0000 (22:19 +1100)]
Expanded entries for generics.

* Now mentions method generics.
* Has separate entries for generic `fn`, `struct`, `enum`, and `impl`
  items.

(Thanks killercup).

8 years agoAuto merge of #28857 - nrc:lowering, r=nikomatsakis
bors [Fri, 9 Oct 2015 08:53:45 +0000 (08:53 +0000)]
Auto merge of #28857 - nrc:lowering, r=nikomatsakis

r? @nikomatsakis

8 years agoIntroduces a "Syntax Index" chapter to TRPL.
Daniel Keep [Fri, 9 Oct 2015 08:47:16 +0000 (19:47 +1100)]
Introduces a "Syntax Index" chapter to TRPL.

The intent with this chapter is to have a central place where users can
go to find out what a random bit of syntax means, be it a keyword,
symbol, or some unusual bit of composite syntax (like `for <...>`).  This
should be useful both for new users (who may not know what to call this
weird `'blah` thing), and for experienced users (who may just wish to
link someone to the appropriate section on `Trait + Trait` bounds).

Where possible, entries have been linked to an appropriate section of
the book which explains the syntax.  This was not possible in all cases.
If an entry is missing links, that's because I was unable to *find*
anything appropriate to link to.

This commit should include all stable keywords, operators and symbols,
as well as a selection of potentially confusing or unusual syntax.

8 years agoreview comments
Nick Cameron [Tue, 6 Oct 2015 19:26:22 +0000 (08:26 +1300)]
review comments

8 years agoAuto merge of #28869 - alexcrichton:allocator-dox, r=steveklabnik
bors [Fri, 9 Oct 2015 06:29:30 +0000 (06:29 +0000)]
Auto merge of #28869 - alexcrichton:allocator-dox, r=steveklabnik

This adds a chapter to the nightly section of the book on leveraging and
implementing the `#![allocator]` attribute to write custom allocators as well as
explaining the current situation with allocators.

8 years agoAuto merge of #28817 - dcarral:installing_rust_v130, r=brson
bors [Fri, 9 Oct 2015 04:43:31 +0000 (04:43 +0000)]
Auto merge of #28817 - dcarral:installing_rust_v130, r=brson

Update "Installing Rust" section @ TRPL so it references the last stable version, v1.3.0.

8 years agoAuto merge of #28919 - huonw:placement-tracking-issue, r=alexcrichton
bors [Fri, 9 Oct 2015 02:57:38 +0000 (02:57 +0000)]
Auto merge of #28919 - huonw:placement-tracking-issue, r=alexcrichton

cc #28244

8 years agoAuto merge of #28888 - arielb1:variant-ctor, r=eddyb
bors [Fri, 9 Oct 2015 01:11:45 +0000 (01:11 +0000)]
Auto merge of #28888 - arielb1:variant-ctor, r=eddyb

this makes the code cleaner, and is a complement to the cleanup on the
HIR side.

r? @eddyb

8 years agoPoint `placement_in_syntax`/`box_syntax` lang features at tracking issue #27779.
Huon Wilson [Thu, 8 Oct 2015 22:13:40 +0000 (09:13 +1100)]
Point `placement_in_syntax`/`box_syntax` lang features at tracking issue #27779.

cc #28244.

8 years agorustfmt'ing
Nick Cameron [Tue, 6 Oct 2015 03:03:56 +0000 (16:03 +1300)]
rustfmt'ing

8 years agoMisc fixups
Nick Cameron [Tue, 6 Oct 2015 02:31:43 +0000 (15:31 +1300)]
Misc fixups

8 years agoAdd a comment
Nick Cameron [Wed, 30 Sep 2015 05:23:52 +0000 (18:23 +1300)]
Add a comment

8 years agoSome cleanup of no longer used AST things
Nick Cameron [Wed, 30 Sep 2015 04:18:09 +0000 (17:18 +1300)]
Some cleanup of no longer used AST things

8 years agoCache ids between lowering runs
Nick Cameron [Wed, 30 Sep 2015 03:17:37 +0000 (16:17 +1300)]
Cache ids between lowering runs

So that lowering is reproducible

8 years agoMake save-analysis work for `if let` etc.
Nick Cameron [Wed, 30 Sep 2015 01:56:19 +0000 (14:56 +1300)]
Make save-analysis work for `if let` etc.

8 years agohygiene for `for` loops, `if let`, `while let`
Nick Cameron [Tue, 29 Sep 2015 23:19:45 +0000 (12:19 +1300)]
hygiene for `for` loops, `if let`, `while let`

and some unrelated test cleanups

8 years agoFix stability
Nick Cameron [Tue, 29 Sep 2015 00:46:01 +0000 (13:46 +1300)]
Fix stability

8 years agoFixes to rustdoc, etc.
Nick Cameron [Tue, 29 Sep 2015 00:18:05 +0000 (13:18 +1300)]
Fixes to rustdoc, etc.

8 years agoMove placement in desugaring to lowering
Nick Cameron [Tue, 29 Sep 2015 00:17:46 +0000 (13:17 +1300)]
Move placement in desugaring to lowering

8 years agoif let and while let
Nick Cameron [Mon, 28 Sep 2015 04:24:42 +0000 (17:24 +1300)]
if let and while let

8 years agoFor loops in save-analysis
Nick Cameron [Mon, 28 Sep 2015 03:24:08 +0000 (16:24 +1300)]
For loops in save-analysis

8 years agoMove `for` loop desugaring to lowering
Nick Cameron [Mon, 28 Sep 2015 02:00:15 +0000 (15:00 +1300)]
Move `for` loop desugaring to lowering

8 years agoAdd a lowering context
Nick Cameron [Fri, 25 Sep 2015 04:03:28 +0000 (16:03 +1200)]
Add a lowering context

8 years agoAuto merge of #28900 - cristicbz:typos, r=alexcrichton
bors [Thu, 8 Oct 2015 22:40:50 +0000 (22:40 +0000)]
Auto merge of #28900 - cristicbz:typos, r=alexcrichton

I found these automatically, but fixed them manually to ensure the semantics are correct. I know things like these are hardly important, since they only marginally improve clarity. But at least for me typos and simple grammatical errors trigger an---unjustified---sense of unprofessionalism, despite the fact that I make them all the time and I understand that they're the sort of thing that is bound to slip through review.

Anyway, to find most of these I used:

  * `ag '.*//.*(\b[A-Za-z]{2,}\b) \1\b'` for repeated words

  * `ag '\b(the|this|those|these|a|it) (a|the|this|those|these|it)\b'` to find constructs like 'the this' etc. many false positives, but not too hard to scroll through them to actually find the mistakes.

  * `cat ../../typos.txt | paste -d'|' - - - - - - - - - - - - - - - - - - - - - - | tr '\n' '\0' | xargs -0 -P4 -n1 ag`. Hacky way to find misspellings, but it works ok. I got `typos.txt` from [Wikipedia](https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines)

* `ag '.*//.* a ([ae][a-z]|(o[^n])|(i[a-rt-z]))'` to find places where 'a' was followed by a vowel (requiring 'an' instead).

I also used a handful more one off regexes that are too boring to reproduce here.

8 years agoplacate check-pretty via comment rearrangement.
Felix S. Klock II [Thu, 8 Oct 2015 21:02:42 +0000 (23:02 +0200)]
placate check-pretty via comment rearrangement.

8 years agoAuto merge of #27197 - nwin:generic-cursor-impl, r=alexcrichton
bors [Thu, 8 Oct 2015 20:53:23 +0000 (20:53 +0000)]
Auto merge of #27197 - nwin:generic-cursor-impl, r=alexcrichton

This is a revival of #23364. Github didn’t recognize my updated branch there.

The cursor implementation now uses `AsRef` which means that fixed-sized array can now be used with `Cursor`. Besides that, the generic implementation simplifies the code as the macro can be avoided.

The only drawback is, that specialized implementation for fixed-sized arrays are now ruled out unless [RFC#1210](https://github.com/rust-lang/rfcs/pull/1210) is accepted & implemented.

`Box<[u8]>` cannot be used yet, but that should be mitigated by [implementing `AsRef` for `Box` and friends](https://internals.rust-lang.org/t/forward-implement-traits-on-smart-pointers-make-smart-pointers-more-transparent/2380/3). I will submit a separate PR for that later as it is an orthogonal issue.

8 years agobook: Add documentation on custom allocators
Alex Crichton [Tue, 6 Oct 2015 17:59:18 +0000 (10:59 -0700)]
book: Add documentation on custom allocators

This adds a chapter to the nightly section of the book on leveraging and
implementing the `#![allocator]` attribute to write custom allocators as well as
explaining the current situation with allocators.

8 years agoAuto merge of #28913 - steveklabnik:rollup, r=steveklabnik
bors [Thu, 8 Oct 2015 19:05:54 +0000 (19:05 +0000)]
Auto merge of #28913 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #28621, #28872, #28893, #28904, #28905, #28908, #28910
- Failed merges: #28906

8 years agotypos: fix a grabbag of typos all over the place
Cristi Cobzarenco [Wed, 7 Oct 2015 22:11:25 +0000 (23:11 +0100)]
typos: fix a grabbag of typos all over the place

8 years agoRollup merge of #28910 - frewsxcv:patch-26, r=steveklabnik
Steve Klabnik [Thu, 8 Oct 2015 17:54:05 +0000 (13:54 -0400)]
Rollup merge of #28910 - frewsxcv:patch-26, r=steveklabnik

8 years agoRollup merge of #28908 - GuillaumeGomez:patch-2, r=Manishearth
Steve Klabnik [Thu, 8 Oct 2015 17:54:05 +0000 (13:54 -0400)]
Rollup merge of #28908 - GuillaumeGomez:patch-2, r=Manishearth

r? @Manishearth

8 years agoRollup merge of #28905 - tshepang:typo, r=steveklabnik
Steve Klabnik [Thu, 8 Oct 2015 17:54:04 +0000 (13:54 -0400)]
Rollup merge of #28905 - tshepang:typo, r=steveklabnik

8 years agoRollup merge of #28904 - panicbit:trpl-derive, r=steveklabnik
Steve Klabnik [Thu, 8 Oct 2015 17:54:04 +0000 (13:54 -0400)]
Rollup merge of #28904 - panicbit:trpl-derive, r=steveklabnik

8 years agoRollup merge of #28893 - steveklabnik:gh28687, r=nikomatsakis
Steve Klabnik [Thu, 8 Oct 2015 17:54:03 +0000 (13:54 -0400)]
Rollup merge of #28893 - steveklabnik:gh28687, r=nikomatsakis

Fixes #28687

8 years agoRollup merge of #28872 - iwillspeak:master, r=Manishearth
Steve Klabnik [Thu, 8 Oct 2015 17:54:03 +0000 (13:54 -0400)]
Rollup merge of #28872 - iwillspeak:master, r=Manishearth

Currently the explain command line flag requires full error codes, complete with
the leading zeros and the E at the beginning. This commit changes that,
if you don't supply a full error code then the error number is padded
out to the required size and the E is added to the beginning.

This means that where previously you would need to write E0001, you can
now write 0001, 001, 01 or just 1 to refer to the same error.

8 years agoFix typo in E0101
Guillaume Gomez [Thu, 8 Oct 2015 09:32:38 +0000 (11:32 +0200)]
Fix typo in E0101

8 years agoAuto merge of #28826 - arthurprs:leading_plus, r=alexcrichton
bors [Thu, 8 Oct 2015 17:19:59 +0000 (17:19 +0000)]
Auto merge of #28826 - arthurprs:leading_plus, r=alexcrichton

Closes #27580

8 years agoAuto merge of #28621 - tshepang:move-safety, r=steveklabnik
bors [Thu, 8 Oct 2015 14:04:41 +0000 (14:04 +0000)]
Auto merge of #28621 - tshepang:move-safety, r=steveklabnik

8 years agoDocument the new more conservative dropck rule and the escape hatch.
Felix S. Klock II [Thu, 8 Oct 2015 13:29:09 +0000 (15:29 +0200)]
Document the new more conservative dropck rule and the escape hatch.

8 years agoAdded tests illustrating when and when not to use the UGEH attribute w.r.t. types...
Felix S. Klock II [Thu, 8 Oct 2015 12:32:36 +0000 (14:32 +0200)]
Added tests illustrating when and when not to use the UGEH attribute w.r.t. types in negative position.

8 years agoAdded tests illustrating when and when not to use the UGEH attribute w.r.t. a lifetim...
Felix S. Klock II [Thu, 8 Oct 2015 12:19:37 +0000 (14:19 +0200)]
Added tests illustrating when and when not to use the UGEH attribute w.r.t. a lifetime param.

8 years agoAdded tests illustrating when and when not to use the UGEH attribute w.r.t. a trait...
Felix S. Klock II [Thu, 8 Oct 2015 12:12:26 +0000 (14:12 +0200)]
Added tests illustrating when and when not to use the UGEH attribute w.r.t. a trait bound.

8 years agoreview comment: reduce the `is_adt_dtorck` method to just a check for the attribute.
Felix S. Klock II [Wed, 7 Oct 2015 11:17:12 +0000 (13:17 +0200)]
review comment: reduce the `is_adt_dtorck` method to just a check for the attribute.

8 years agoAuto merge of #28897 - steveklabnik:rollup, r=steveklabnik
bors [Thu, 8 Oct 2015 12:15:47 +0000 (12:15 +0000)]
Auto merge of #28897 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #28836, #28856, #28874, #28876, #28878, #28880, #28882, #28885, #28889, #28896
- Failed merges:

8 years agoFormat code-like text in Iterator::cloned doc-comment
Corey Farwell [Thu, 8 Oct 2015 12:00:02 +0000 (08:00 -0400)]
Format code-like text in Iterator::cloned doc-comment

8 years agoAuto merge of #28891 - cristicbz:new-nbody, r=alexcrichton
bors [Thu, 8 Oct 2015 10:04:12 +0000 (10:04 +0000)]
Auto merge of #28891 - cristicbz:new-nbody, r=alexcrichton

This new version takes inspiration from the C implementation of the benchmark, but instead of explicitly using SIMD operations which can't be done on stable, it instead arranges everything the same way and leaves the actual vectorization up to LLVM.

In addition to the ~20% speed gains (see below), this PR also adds some general niceties which showcase the language a little bit: a `Vec3` type to cut down on `(x, y, z)` repetition,  using `while let` instead of `loop-if-break`, iterator adapters instead of for loops etc.

Here are the times in seconds of 10 runs each on my workstation:

```
before: 6.254, 6.260, 6.263, 6.264, 6.265, 6.267, 6.334, 6.341, 6.441, 6.509
before-min: 6.254
before-median: 6.266
before-max: 6.509

after: 4.823, 4.824, 4.826, 4.827, 4.837, 4.839, 4.881, 4.959, 4.990, 5.377
after-min: 4.823
after-median: 4.838
after-max: 5.377

gcc: 4.674, 4.676, 4.680, 4.682, 4.695, 4.696, 4.701, 4.708, 4.794, 5.297
gcc-min: 4.674
gcc-median: 4.696
gcc-max: 5.297
```

On my i7 laptop the speed up is less impressive, from ~5.4s to ~4.7s, but still significant. On my Vultr VPS the numbers look closer to the workstation results. Surprisingly my laptop beats both office workstation and VPS...

8 years agoAuto merge of #28892 - cristicbz:default-wrapping, r=alexcrichton
bors [Thu, 8 Oct 2015 07:39:06 +0000 (07:39 +0000)]
Auto merge of #28892 - cristicbz:default-wrapping, r=alexcrichton

It's not very common to store `Wrapping` values, but I kept wrapping and unwrapping a hash value when I taking it out of a struct to do operations on it. I couldn't store the hash as `Wrapping<u64>` because I wanted to be able to `#[derive(Default)]` for the struct.

At any rate, it feels to me that `Wrapping<T>` should implement pretty much everything `T` does. I left out `#[derive(Hash)]` since I'd be hard pressed to find a use case and wanted to avoid the extra generated code, but maybe I should add that too?

8 years agoreference: fix typos
Tshepang Lekhonkhobe [Thu, 8 Oct 2015 05:24:00 +0000 (07:24 +0200)]
reference: fix typos

8 years agotrpl: link to derivable trait's docs
panicbit [Thu, 8 Oct 2015 05:27:26 +0000 (07:27 +0200)]
trpl: link to derivable trait's docs

8 years agotrpl: mention deriving in traits section
panicbit [Thu, 8 Oct 2015 05:10:56 +0000 (07:10 +0200)]
trpl: mention deriving in traits section

8 years agoAuto merge of #28863 - nagisa:test-16403, r=alexcrichton
bors [Thu, 8 Oct 2015 02:31:46 +0000 (02:31 +0000)]
Auto merge of #28863 - nagisa:test-16403, r=alexcrichton

Closes #16403

8 years agoAuto merge of #28811 - alexcrichton:as-ref-ptrs, r=aturon
bors [Thu, 8 Oct 2015 00:46:01 +0000 (00:46 +0000)]
Auto merge of #28811 - alexcrichton:as-ref-ptrs, r=aturon

These common traits were left off originally by accident from these smart
pointers, and a past attempt (#26008) to add them was later reverted (#26160)
due to unexpected breakge (#26096) occurring. The specific breakage in worry is
the meaning of this return value changed:

    let a: Box<Option<T>> = ...;
    a.as_ref()

Currently this returns `Option<&T>` but after this change it will return
`&Option<T>` because the `AsRef::as_ref` method shares the same name as
`Option::as_ref`. A [crater report][crater] of this change, however, has shown
that the fallout of this change is quite minimal. These trait implementations
are "the right impls to add" to these smart pointers and would enable various
generalizations such as those in #27197.

[crater]: https://gist.github.com/anonymous/0ba4c3512b07641c0f99

This commit is a breaking change for the above reasons mentioned, and the
mitigation strategies look like any of:

    Option::as_ref(&a)
    a.as_ref().as_ref()
    (*a).as_ref()

8 years agoRollup merge of #28896 - mkpankov:core-fmt, r=nrc
Steve Klabnik [Wed, 7 Oct 2015 22:18:38 +0000 (18:18 -0400)]
Rollup merge of #28896 - mkpankov:core-fmt, r=nrc

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/rust-lang/rust/28896)
<!-- Reviewable:end -->

8 years agoRollup merge of #28889 - JIghtuse:str_doc, r=steveklabnik
Steve Klabnik [Wed, 7 Oct 2015 22:18:38 +0000 (18:18 -0400)]
Rollup merge of #28889 - JIghtuse:str_doc, r=steveklabnik

8 years agoRollup merge of #28885 - frewsxcv:patch-25, r=alexcrichton
Steve Klabnik [Wed, 7 Oct 2015 22:18:38 +0000 (18:18 -0400)]
Rollup merge of #28885 - frewsxcv:patch-25, r=alexcrichton

8 years agoRollup merge of #28882 - ykomatsu:trpl, r=steveklabnik
Steve Klabnik [Wed, 7 Oct 2015 22:18:37 +0000 (18:18 -0400)]
Rollup merge of #28882 - ykomatsu:trpl, r=steveklabnik

8 years agoRollup merge of #28880 - Wallacoloo:book-5.14-typo, r=alexcrichton
Steve Klabnik [Wed, 7 Oct 2015 22:18:37 +0000 (18:18 -0400)]
Rollup merge of #28880 - Wallacoloo:book-5.14-typo, r=alexcrichton

The diff can hopefully speak for itself. Regardless: this chapter of the book contained a sentence where "the" was mistakenly repeated twice. In this same section, there was a comma separating two sentences where a period should have been. This PR fixes both issues.

8 years agoRollup merge of #28878 - sourcefrog:doc-links, r=steveklabnik
Steve Klabnik [Wed, 7 Oct 2015 22:18:37 +0000 (18:18 -0400)]
Rollup merge of #28878 - sourcefrog:doc-links, r=steveklabnik

8 years agoRollup merge of #28876 - steveklabnik:oops, r=Gankro
Steve Klabnik [Wed, 7 Oct 2015 22:18:37 +0000 (18:18 -0400)]
Rollup merge of #28876 - steveklabnik:oops, r=Gankro

In #28864, @aarzee submitted some whitespace fixes. I r+'d it. But
@retp998 noticed[1] that this file is explicitly a test of this kind of
whitespace, and so I shouldn't have changed it. This restores the old
line endings.

1: https://github.com/rust-lang/rust/pull/28864#discussion_r41332279

8 years agoRollup merge of #28874 - GuillaumeGomez:error_code, r=Manishearth
Steve Klabnik [Wed, 7 Oct 2015 22:18:36 +0000 (18:18 -0400)]
Rollup merge of #28874 - GuillaumeGomez:error_code, r=Manishearth

r? @Manishearth

8 years agoRollup merge of #28856 - chills42:master, r=steveklabnik
Steve Klabnik [Wed, 7 Oct 2015 22:18:36 +0000 (18:18 -0400)]
Rollup merge of #28856 - chills42:master, r=steveklabnik

This is to address issue #28803 by improving some of the references to closures, to explain what they are more clearly, while hopefully still being concise.

r? @steveklabnik

8 years agoRollup merge of #28836 - jackwilsonv:patch-6, r=steveklabnik
Steve Klabnik [Wed, 7 Oct 2015 22:18:36 +0000 (18:18 -0400)]
Rollup merge of #28836 - jackwilsonv:patch-6, r=steveklabnik

r? @steveklabnik

8 years agoFix comment gone astray
Michael Pankov [Wed, 7 Oct 2015 22:08:33 +0000 (01:08 +0300)]
Fix comment gone astray

8 years agorustfmt hash submodule
Michael Pankov [Wed, 7 Oct 2015 22:03:52 +0000 (01:03 +0300)]
rustfmt hash submodule

8 years agorustfmt part of libcore/fmt
Michael Pankov [Wed, 7 Oct 2015 22:01:02 +0000 (01:01 +0300)]
rustfmt part of libcore/fmt

Rest is blocked by https://github.com/nrc/rustfmt/issues/413

8 years agoAuto merge of #28884 - Ms2ger:fmt-mir, r=nikomatsakis
bors [Wed, 7 Oct 2015 21:25:43 +0000 (21:25 +0000)]
Auto merge of #28884 - Ms2ger:fmt-mir, r=nikomatsakis

This commit contains some of the changes proposed by a rustfmt invocation,
chosen based on the fairly non-deterministic metric of how much I liked the
change. I expect we will run rustfmt on this crate again later, probably
accepting more of its changes. For now, this is already an improvement over
the status-quo.

8 years agoComment on shadowing with patterns
Steve Klabnik [Wed, 7 Oct 2015 20:41:15 +0000 (16:41 -0400)]
Comment on shadowing with patterns

Fixes #28687

8 years agocore: Derive Default for Wrapping<T>
Cristi Cobzarenco [Wed, 7 Oct 2015 20:31:36 +0000 (21:31 +0100)]
core: Derive Default for Wrapping<T>

8 years agobench: rewrite nbody for better vectorization
Cristi Cobzarenco [Wed, 7 Oct 2015 19:45:21 +0000 (20:45 +0100)]
bench: rewrite nbody for better vectorization

8 years agoAuto merge of #28852 - steveklabnik:doc_char, r=alexcrichton
bors [Wed, 7 Oct 2015 19:40:03 +0000 (19:40 +0000)]
Auto merge of #28852 - steveklabnik:doc_char, r=alexcrichton

Mostly adding examples, and reformatting for consistency.

8 years agotrpl: Fix some bad wording in iterators subsection
Boris Egorov [Wed, 7 Oct 2015 17:37:24 +0000 (23:37 +0600)]
trpl: Fix some bad wording in iterators subsection

8 years agotrpl: Use ordered list to release user from counting
Boris Egorov [Wed, 7 Oct 2015 16:44:17 +0000 (22:44 +0600)]
trpl: Use ordered list to release user from counting

Later in text we mention 'step four' and 'step three'. This fix releases user
from counting.

8 years agouse the struct's ctor-id as its variant def-id
Ariel Ben-Yehuda [Wed, 7 Oct 2015 17:30:48 +0000 (20:30 +0300)]
use the struct's ctor-id as its variant def-id

this makes the code cleaner, and is a complement to the cleanup on the
HIR side.

8 years agoAuto merge of #28873 - dotdash:28339, r=nikomatsakis
bors [Wed, 7 Oct 2015 16:41:55 +0000 (16:41 +0000)]
Auto merge of #28873 - dotdash:28339, r=nikomatsakis

Fixes #28839

8 years agoFix reborrows of &mut pointers
Björn Steinbrink [Tue, 6 Oct 2015 20:45:56 +0000 (22:45 +0200)]
Fix reborrows of &mut pointers

Fixes #28839

8 years agoAuto merge of #28868 - JIghtuse:str_doc, r=steveklabnik
bors [Wed, 7 Oct 2015 13:58:51 +0000 (13:58 +0000)]
Auto merge of #28868 - JIghtuse:str_doc, r=steveklabnik

8 years agoAlter formatting for words in Option::cloned doc comment
Corey Farwell [Wed, 7 Oct 2015 13:30:51 +0000 (09:30 -0400)]
Alter formatting for words in Option::cloned doc comment

8 years agoPartially format librustc_mir with rustfmt.
Ms2ger [Wed, 7 Oct 2015 12:37:42 +0000 (14:37 +0200)]
Partially format librustc_mir with rustfmt.

This commit contains some of the changes proposed by a rustfmt invocation,
chosen based on the fairly non-deterministic metric of how much I liked the
change. I expect we will run rustfmt on this crate again later, probably
accepting more of its changes. For now, this is already an improvement over
the status-quo.

8 years agoAuto merge of #28867 - panicbit:german-trpl, r=steveklabnik
bors [Wed, 7 Oct 2015 12:13:32 +0000 (12:13 +0000)]
Auto merge of #28867 - panicbit:german-trpl, r=steveklabnik

8 years agoMake `--explain` Handle Partial Error Codes
Will Speak [Tue, 6 Oct 2015 20:15:04 +0000 (21:15 +0100)]
Make `--explain` Handle Partial Error Codes

Currently the explain command requires full erorr codes, complete with
the leading zeros and the E at the beginning. This commit changes that,
if you don't supply a full erorr code then the error number is padded
out to the required size and the E is added to the beginning.

This means that where previously you would need to write E0001, you can
now write 0001, 001, 01 or jsut 1 to refer to the same error.

8 years agoAuto merge of #28865 - GuillaumeGomez:patch-1, r=Manishearth
bors [Wed, 7 Oct 2015 10:27:31 +0000 (10:27 +0000)]
Auto merge of #28865 - GuillaumeGomez:patch-1, r=Manishearth

r? @Manishearth

8 years agoAdd a test for #16403
Simonas Kazlauskas [Tue, 6 Oct 2015 14:39:49 +0000 (17:39 +0300)]
Add a test for #16403

8 years agoAdd error explanation for E0515
Guillaume Gomez [Tue, 6 Oct 2015 21:08:33 +0000 (23:08 +0200)]
Add error explanation for E0515

8 years agoAdd new error code
Guillaume Gomez [Tue, 6 Oct 2015 21:06:15 +0000 (23:06 +0200)]
Add new error code

8 years agoAuto merge of #28877 - sourcefrog:doc-fuse, r=alexcrichton
bors [Wed, 7 Oct 2015 07:41:36 +0000 (07:41 +0000)]
Auto merge of #28877 - sourcefrog:doc-fuse, r=alexcrichton

8 years agoFix a typo
Yoshito Komatsu [Wed, 7 Oct 2015 07:07:42 +0000 (16:07 +0900)]
Fix a typo
Add musl link