Commit Graph

67068 Commits

Author SHA1 Message Date
Felix S. Klock II
8e79fc72cb Move borrowck error msg construction to module in rustc_mir (for later reuse by mir borrowck).
post-rebase: Do not put "(Ast)" suffix in error msg unless passed `-Z borrowck-mir`.
(But unconditionally include "(Mir)" suffix for mir-borrowck errors.)
2017-08-16 15:52:45 +02:00
Michael Woerister
14d62c650f Run MIR passes on promoted temporaries again. 2017-08-16 15:46:34 +02:00
bors
c88624682d Auto merge of #43850 - GuillaumeGomez:unused-variable-lint, r=arielb1
Add a note to unused variables

Fixes #26720.
2017-08-16 12:47:28 +00:00
Guillaume Gomez
9b0607ab4e Add a note to unused variables 2017-08-16 13:53:47 +02:00
Guillaume Gomez
589d994c38 udpdate error message for unsized union field 2017-08-16 13:32:41 +02:00
Tobias Schaffner
2ccaeff582 Refactoring: move net specific fd imps to net
Move the implementations of net specific file descriptior implementations
to net. This makes it easier to exclude net at all if not needed for a
target.
2017-08-16 13:27:20 +02:00
bors
85eadf84f3 Auto merge of #43841 - alexcrichton:fix-another-regression, r=eddyb
rustc: Fix `unknown_lints` next to an unknown lint

The lint refactoring in #43522 didn't account for `#[allow(unknown_lints)]`
happening at the same node as an unknown lint itself, so this commit updates the
handling to ensure that the local set of lint configuration being built is
queried before looking at the chain of lint levels.

Closes #43809
2017-08-16 10:00:33 +00:00
bors
4fc3765c54 Auto merge of #43883 - frewsxcv:frewsxcv-set-readonly-clarification, r=QuietMisdreavus
Clarify writable behavior of readonly-named `Permissions` methods.

Opened primarily to fix https://github.com/rust-lang/rust/issues/41984.
2017-08-16 06:56:11 +00:00
Luca Barbato
5d91eda8b3 Add support for Vector Unpack High and Low on PowerPC 2017-08-16 05:04:42 +00:00
Luca Barbato
88fc6dc369 Add support for Vector Pack Pixel on PowerPC
The llvm intrinsic uses signed integers.
2017-08-16 05:04:41 +00:00
Luca Barbato
1773233d74 Add support for Vector Pack Saturated Unsigned on PowerPC 2017-08-16 05:04:41 +00:00
Luca Barbato
c2cdcefead Add support for Vector Pack Saturated on PowerPC 2017-08-16 05:04:41 +00:00
bors
6f4ab9458a Auto merge of #43710 - zackmdavis:field_init_shorthand_power_slam, r=Mark-Simulacrum
use field init shorthand EVERYWHERE

Like #43008 (f668999), but [(lacking reasons to be more timid)](https://github.com/rust-lang/rust/pull/43008#issuecomment-312463564) _much more aggressive_.

r? @Mark-Simulacrum
2017-08-16 04:00:24 +00:00
Corey Farwell
10a479ebe1 Clarify 'writable'-changing behavior of set_readonly.
Fixes https://github.com/rust-lang/rust/issues/41984.
2017-08-15 21:43:11 -04:00
bors
e40dc66f47 Auto merge of #43651 - petrochenkov:foreign-life, r=eddyb
Fix ICE with elided lifetimes in return type of foreign functions

cc https://github.com/rust-lang/rust/issues/43567

This is for a preliminary crater/cargobomb run.
Lifetime elision in foreign functions now works exactly like in other functions or function-like entities.

If the breakage is significant, I'll have to partially revert https://github.com/rust-lang/rust/pull/43543 (all the stuff that was required for dealing with late bound lifetimes in this position).

r? @eddyb
2017-08-16 01:16:37 +00:00
Zack M. Davis
1b6c9605e4 use field init shorthand EVERYWHERE
Like #43008 (f668999), but _much more aggressive_.
2017-08-15 15:29:17 -07:00
bors
1e60a477a3 Auto merge of #43245 - Gankro:drain-filter, r=sfackler
Add Vec::drain_filter

This implements the API proposed in #43244.

So I spent like half a day figuring out how to implement this in some awesome super-optimized unsafe way, which had me very confident this was worth putting into the stdlib.

Then I looked at the impl for `retain`, and was like "oh dang". I compared the two and they basically ended up being the same speed. And the `retain` impl probably translates to DoubleEndedIter a lot more cleanly if we ever want that.

So now I'm not totally confident this needs to go in the stdlib, but I've got two implementations and an amazingly robust test suite, so I figured I might as well toss it over the fence for discussion.
2017-08-15 22:28:23 +00:00
Fourchaux
c7104be1a3 Fix typos & us spellings 2017-08-15 21:56:30 +02:00
bors
f25c2283b3 Auto merge of #43635 - ids1024:backtrace-redox, r=alexcrichton
Make backtraces work on Redox, copying Unix implementation

The `backtrace/` directory here is the same as the Unix one, except for adding an implementation of `get_executable_filename`.
2017-08-15 19:27:29 +00:00
bors
82be83cf74 Auto merge of #43500 - murarth:string-retain, r=alexcrichton
Add method `String::retain`

Behaves like `Vec::retain`, accepting a predicate `FnMut(char) -> bool`
and reducing the string to only characters for which the predicate
returns `true`.
2017-08-15 16:21:28 +00:00
kennytm
438abf0a58
Stop testing i586-pc-windows-msvc on AppVeyor.
Fixes #43881. Reduces AppVeyor test time back to ~2 hours on
average.

The i586 libstd was never tested before Aug 13th, so this PR
brings the situation back to the previous status-quo.
2017-08-15 22:41:38 +08:00
Corey Farwell
5a93be48c3 Clarify readonly method is also about being 'unwritable'. 2017-08-15 10:11:37 -04:00
Corey Farwell
1949c6599d Add comments clarifying behavior of unix set_readonly behavior. 2017-08-15 09:42:11 -04:00
bors
1b08e0f231 Auto merge of #43303 - redox-os:redox_docker, r=alexcrichton
Add Redox Dockerfile and Travis Environment

This adds Redox to the Travis build. This is an example implementation of https://github.com/rust-lang/rust/issues/43206
2017-08-15 13:33:05 +00:00
Jeremy Soller
727b473e5c Mark install-x86_64-redox.sh as executable 2017-08-15 06:46:06 -06:00
bors
c774c95919 Auto merge of #43863 - steveklabnik:ship-the-rustdoc-book, r=frewsxcv
Ship the rustdoc book

Fixes #42322, as it's the last step.

Blocked on https://github.com/rust-lang/rust/pull/43790, though they will not conflict.

r? @rust-lang/docs
2017-08-15 07:28:54 +00:00
kennytm
034cd20f52
Exclude impl Trait functions from everybody_loops.
Fixes #43869.
2017-08-15 14:35:43 +08:00
John Kåre Alsaker
17197c660c Remove fixme 2017-08-15 07:55:06 +02:00
bors
f6a30bd37b Auto merge of #43859 - arielb1:nonfree-block-live, r=nagisa
emit StorageLive for box temporaries

We started emitting StorageDead, so we better emit the corrseponding
StorageLive to avoid problems.

cc #43772 solson/miri#303
2017-08-15 04:32:17 +00:00
Murarth
618ac89d25 Add method String::retain
Behaves like `Vec::retain`, accepting a predicate `FnMut(char) -> bool`
and reducing the string to only characters for which the predicate
returns `true`.
2017-08-14 20:42:26 -07:00
Alex Crichton
b6b9690a76 Fix merge conflicts with gen branch 2017-08-14 20:12:13 -07:00
Alex Crichton
22ebcaca16 Choose another error code 2017-08-14 19:38:32 -07:00
Alex Crichton
1413253a41 Merge remote-tracking branch 'origin/master' into gen 2017-08-14 19:36:13 -07:00
bors
df806275c7 Auto merge of #43872 - frewsxcv:rollup, r=frewsxcv
Rollup of 6 pull requests

- Successful merges: #43756, #43790, #43846, #43848, #43862, #43868
- Failed merges:
2017-08-15 01:43:12 +00:00
steveklabnik
2c6cf22a30 Remove plugins chapter
we don't want to support plugins
2017-08-14 20:33:30 -04:00
Corey Farwell
1259db2fa4 Rollup merge of #43868 - lukaramu:issue-43866, r=steveklabnik
Add missing newline in Deref docs to fix rendering

Fixes #43866.

(Verified locally.)

r? @steveklabnik
2017-08-14 20:28:48 -04:00
Corey Farwell
a3a59a1711 Rollup merge of #43862 - QuietMisdreavus:get-in-line-autohide, r=GuillaumeGomez
rustdoc: put auto-hidden docblock labels in line with the toggle

before:

![image](https://user-images.githubusercontent.com/5217170/29279951-0cf21d86-80df-11e7-86d5-bfd76c5df429.png)

after:

![image](https://user-images.githubusercontent.com/5217170/29279962-18479ce2-80df-11e7-952a-d22cb03965e5.png)

(images taken from `std::heap::AllocErr`)
2017-08-14 20:28:47 -04:00
Corey Farwell
5edcf9bc11 Rollup merge of #43848 - frewsxcv:frewsxcv-stack-size, r=QuietMisdreavus
Rewrite/reorganize docs for stack size/thread names for spawned threads.

* Moves docs about stack size and thread naming from `Builder` to the
  `std::thread` module
* Adds more links to the new module-level documentation
* Mentions the 2 MiB stack size default, but indicate it's subject to
  change

Fixes https://github.com/rust-lang/rust/issues/43805.
2017-08-14 20:28:46 -04:00
Corey Farwell
c2009536ac Rollup merge of #43846 - frewsxcv:frewsxcv-mailmap, r=Mark-Simulacrum
Remove my mailmap entry.

I no longer want this mailmap entry for myself.
2017-08-14 20:28:45 -04:00
Corey Farwell
b1bdf13e6b Rollup merge of #43790 - steveklabnik:rustdoc-passes, r=QuietMisdreavus
Write the "passes" chapter of the rustdoc book

cc #42322

r? @rust-lang/docs
2017-08-14 20:28:44 -04:00
Corey Farwell
337389741f Rollup merge of #43756 - sfackler:instant-nondecreasing, r=alexcrichton
Instant is monotonically nondecreasing

We don't want to guarantee that `Instant::now() != Instant::now()` is
always true since that depends on the speed of the processor and the
resolution of the clock.
2017-08-14 20:28:43 -04:00
bors
56fe3b2ad0 Auto merge of #43858 - arielb1:escaping-default, r=eddyb
remove the "defaulted unit" type bit during writeback

The defaulted unit bit is only relevant for the surrounding inference
context, and can cause trouble, including spurious lints and ICEs,
outside of it.

Fixes #43853.

r? @eddyb
2017-08-14 22:44:09 +00:00
Jeremy Soller
1cc33c07fa Move Redox Dockerfile to disabled directory :( 2017-08-14 15:46:43 -06:00
Jeremy Soller
a3d9c36720 Use scripts to reduce code size 2017-08-14 15:45:54 -06:00
Jeremy Soller
9a76934cea Add redox build to cross 2017-08-14 15:45:54 -06:00
Jeremy Soller
6d8520d638 Add Redox Dockerfile 2017-08-14 15:45:54 -06:00
lukaramu
879107f1a8 Add missing newline in Deref docs to fix rendering
Fixes #43866.
2017-08-14 22:12:33 +02:00
Guillaume Gomez
3af0e4a2ad Remove useless help part 2017-08-14 21:56:55 +02:00
bors
df511d5548 Auto merge of #43826 - kennytm:fix-43796-mis-calculated-spans, r=petrochenkov
Fix "Mis-calculated spans" errors from `-Z save-analysis` + refactoring

Removed the path span extraction methods from `SpanUtils`:

* spans_with_brackets
* spans_for_path_segments
* spans_for_ty_params

Use the `span` fields in `PathSegment` and `TyParam` instead.

(Note that since it processes `ast::Path` not a qualified path (`hir::QPath` / `ast::QSelf`), UFCS path will be flattened: `<Foo as a:🅱️:c::Trait>::D::E::F::g` will be seen as `a:🅱️:c::Trait::D::E::F::g`.)

Fix #43796. Close #41478.

r? @nrc
2017-08-14 19:55:20 +00:00
steveklabnik
7a5ee171c3 Write the "passes" chapter of the rustdoc book
cc #42322
2017-08-14 15:10:56 -04:00