]> git.lizzy.rs Git - rust.git/log
rust.git
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

8 years agoAuto merge of #28866 - nikomatsakis:remove-hair-trait, r=nrc
bors [Wed, 7 Oct 2015 05:11:44 +0000 (05:11 +0000)]
Auto merge of #28866 - nikomatsakis:remove-hair-trait, r=nrc

As the subject says. This PR also removes the `Hair` trait, which was impeding the ability to build such a map, as described in this thread on internals:

https://internals.rust-lang.org/t/removing-the-hair-trait-from-mir-construction/2732

r? @nrc

8 years agoFix "the the" typo and split a run-on sentence
Colin Wallace [Sun, 20 Sep 2015 02:50:42 +0000 (19:50 -0700)]
Fix "the the" typo and split a run-on sentence

8 years agostyle guide: suggest manual links to constructors
Martin Pool [Wed, 7 Oct 2015 02:42:58 +0000 (19:42 -0700)]
style guide: suggest manual links to constructors

8 years agoLink from Fuse type docstring to iter.fuse that creates them
Martin Pool [Wed, 7 Oct 2015 02:29:27 +0000 (19:29 -0700)]
Link from Fuse type docstring to iter.fuse that creates them

8 years agoUse the correct mod name from the example
Jack Wilson [Sun, 4 Oct 2015 20:17:35 +0000 (13:17 -0700)]
Use the correct mod name from the example

8 years agoRestore line endings in a test
Steve Klabnik [Wed, 7 Oct 2015 01:59:49 +0000 (21:59 -0400)]
Restore line endings in a test

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 agoAuto merge of #28841 - jld:const-slice-ice, r=Aatch
bors [Wed, 7 Oct 2015 01:59:31 +0000 (01:59 +0000)]
Auto merge of #28841 - jld:const-slice-ice, r=Aatch

This turned up as part of #3170.  When constructing an `undef` value to
return in the error case, we were trying to get the element type of the
Rust-level value being indexed instead of the underlying array; when
indexing a slice, that's not an array and the LLVM assertion failure
reflects this.

The regression test is a lightly altered copy of `const-array-oob.rs`.

8 years agoUpdate TRPL/Installing Rust to avoid concrete version numbers
Daniel Carral [Fri, 2 Oct 2015 22:18:30 +0000 (00:18 +0200)]
Update TRPL/Installing Rust to avoid concrete version numbers

As discussed in PR #28817

8 years agoWrite a bunch of docs for char
Steve Klabnik [Mon, 5 Oct 2015 22:09:31 +0000 (18:09 -0400)]
Write a bunch of docs for char

Mostly adding examples, and reformatting for consistency.

8 years agoremove now unnecessary trait impls
Niko Matsakis [Tue, 6 Oct 2015 20:49:02 +0000 (16:49 -0400)]
remove now unnecessary trait impls

8 years agoAuto merge of #28864 - aarzee:master, r=steveklabnik
bors [Tue, 6 Oct 2015 20:21:34 +0000 (20:21 +0000)]
Auto merge of #28864 - aarzee:master, r=steveklabnik

Remove leading newlines in files and replace lines containing only whitespace with blank lines

8 years agofix some tidy complaints
Niko Matsakis [Tue, 6 Oct 2015 18:58:15 +0000 (14:58 -0400)]
fix some tidy complaints

8 years agodoc: Mention split_whitespace in split doc
Boris Egorov [Tue, 6 Oct 2015 17:05:05 +0000 (23:05 +0600)]
doc: Mention split_whitespace in split doc

8 years agoAuto merge of #28842 - chrisccerami:patch-1, r=steveklabnik
bors [Tue, 6 Oct 2015 17:57:00 +0000 (17:57 +0000)]
Auto merge of #28842 - chrisccerami:patch-1, r=steveklabnik

8 years agoAdd link to the german trpl translation
panicbit [Tue, 6 Oct 2015 10:31:57 +0000 (12:31 +0200)]
Add link to the german trpl translation

8 years agoReplace multiple trailing newlines with a single trailing newline
Carlos Liam [Tue, 6 Oct 2015 17:06:39 +0000 (13:06 -0400)]
Replace multiple trailing newlines with a single trailing newline

Sorry I didn’t get this in the last PR (#28864), I hadn’t thought of it.

8 years agorename `dump` to `mir_map`, which seems more suitable
Niko Matsakis [Tue, 6 Oct 2015 16:37:43 +0000 (12:37 -0400)]
rename `dump` to `mir_map`, which seems more suitable

8 years agomake mir map available to later passes (currently unused)
Niko Matsakis [Tue, 6 Oct 2015 16:35:53 +0000 (12:35 -0400)]
make mir map available to later passes (currently unused)

8 years agoAdd error explanation for E0496
Guillaume Gomez [Tue, 6 Oct 2015 16:04:09 +0000 (18:04 +0200)]
Add error explanation for E0496

8 years agostore the mir into a map, restructure to avoid rebuilding so many times
Niko Matsakis [Tue, 6 Oct 2015 15:41:31 +0000 (11:41 -0400)]
store the mir into a map, restructure to avoid rebuilding so many times

8 years agoClean newlines
Carlos Liam [Tue, 6 Oct 2015 15:14:11 +0000 (11:14 -0400)]
Clean newlines

8 years agoreview comment: use RFC example for compile-fail/issue28498-reject-ex1.rs
Felix S. Klock II [Tue, 6 Oct 2015 14:54:10 +0000 (16:54 +0200)]
review comment: use RFC example for compile-fail/issue28498-reject-ex1.rs

(It is not *exactly* the text from the RFC, but the only thing it adds
is a call to a no-op function that is just an attempt to make it clear
where the potential for impl specialization comes from.)

8 years agoshorten URLs to placate `make tidy`.
Felix S. Klock II [Tue, 6 Oct 2015 14:51:20 +0000 (16:51 +0200)]
shorten URLs to placate `make tidy`.

8 years agopurge `-Z always-build-mir`, which is no longer relevant
Niko Matsakis [Tue, 6 Oct 2015 14:48:11 +0000 (10:48 -0400)]
purge `-Z always-build-mir`, which is no longer relevant