Commit Graph

66850 Commits

Author SHA1 Message Date
Hunter Praska
ff047a8a25
Use direct references to CompilerDesugaringKind 2017-08-16 18:46:48 -05:00
bors
be0f77dc8a Auto merge of #43864 - GuillaumeGomez:static-method-invalid-use, r=eddyb
Add help for static method invalid use

Fixes #30391.
2017-08-16 23:40:01 +00:00
Anthony Defranceschi
d6cdefc4e0 added whitespace 2017-08-17 01:39:23 +02:00
Carol (Nichols || Goulding)
5be97beeea Implement a temp redirect for cargo docs
As discussed in
https://github.com/rust-lang/cargo/issues/4040#issuecomment-321639074

This is a redirect meant to be replaced once cargo docs have been
converted to mdbook. We just want *a* URL to ride the trains for now so
that we can print doc.rust-lang.org/cargo in the paper book and
guarantee that it will go *somewhere* useful by the time the book is
printed.

Implemented as a meta redirect in HTML because we don't currently have
any google juice at doc.rust-lang.org/cargo to lose.
2017-08-16 19:08:33 -04:00
adrian5
c9f9992419 Fix typo in doc 2017-08-17 00:46:30 +02:00
bors
7ac979d8cb Auto merge of #43838 - eddyb:stable-rvalue-promotion, r=arielb1
Stabilize rvalue promotion to 'static.

Closes #38865.

Documentation PR at rust-lang-nursery/reference#98.
2017-08-16 21:00:21 +00:00
Anthony Defranceschi
fe06b70b2a E0106: field lifetimes
I've added an example for custom type lifetimes located in another `struct` fields.
2017-08-16 22:49:18 +02:00
steveklabnik
010f59750f Update the books for next release 2017-08-16 16:08:08 -04:00
arthurprs
519cf15ea6 Update jemalloc to 4.5.0 2017-08-16 22:06:05 +02:00
bors
3f94b7103b Auto merge of #43884 - kennytm:fix-43881-do-not-test-i586-msvc, r=alexcrichton
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-16 18:24:59 +00:00
Eduard-Mihai Burtescu
014333fbd4 Stabilize rvalue promotion to 'static. 2017-08-16 20:30:56 +03:00
Andy Russell
88bac1f745
remove procsrv module 2017-08-16 11:45:08 -04:00
Andy Russell
6f21239fa5
remove extra_args argument 2017-08-16 11:45:07 -04:00
Andy Russell
04dee08501
return Command from make_compile_args 2017-08-16 11:45:07 -04:00
Andy Russell
90a87be9cb
make compose_and_run_compiler take Command 2017-08-16 11:45:06 -04:00
Andy Russell
0a666f87ca
remove working_dir argument 2017-08-16 11:45:06 -04:00
Andy Russell
e385bc5bcc
let compose_and_run take a Command 2017-08-16 11:45:05 -04:00
Andy Russell
6601ffca07
replace procsrv functions with Command 2017-08-16 11:45:05 -04:00
bors
00a6797f05 Auto merge of #43108 - pnkfelix:mir-borrowck3c, r=arielb1
MIR borrow check (under debug flag)

Here is the current state of MIR borrow check.

It consists of (1.) some refactoring, (2.) a dataflow analysis to identify the borrows themselves, and (3.) a mir "transform" that does the borrow check itself based on the aforementioned dataflow results.

(There's also a drive-by fix to dataflow that I can factor into a separate PR if necessary. Interestingly I could not find a way to observe the bug outside of MIR borrowck.)

To be clear, this branch is not ready to be used as the default borrow check. Thus the code is guarded: To get mir-borrowck to run, you need to either supply an attribute `#[rustc_mir_borrowck]` or a debug flag `-Z borrowck-mir`.

Here are the main issues with the current MIR borrowck as it stands in this PR:

 * No Notes emitted yet, just errors. (So the feedback is definitely inferior compared to AST borrowck today)
 * Lvalue rendering differs between Ast and Mir. (Mostly minor, but replacement of field names with indices is very bad; big priority for me to fix ASAP.)
 * Lots of ICEs (presumably because some MIR operations used here have well-formedness assumptions that are violated in borrowck-broken code)
 * Conflates lots of cases that are distinguished by AST-borrowck
 * Conflates "uninitialized" with "moved" (special case of previous bullet, one that I think should be fixed ASAP)

 (I am hoping to fix as many of the above issues as I can in the near term, but I also would like to land this even if they are *not* all fixed, because the rebasing effort is getting to be a real drag.)
2017-08-16 15:36:00 +00:00
Martin Hoffmann
02aaa1180e Document that std:#️⃣:Hasher::finish() does not reset the hasher. 2017-08-16 17:02:39 +02:00
Seiichi Uchida
0bfe4178af Eat open paren when parsing list 2017-08-16 23:40:06 +09:00
Felix S. Klock II
8738a087ff Moved mir-borrowck pass down to where comments say it should be.
Added two fixmes: The `SimplifyBranches` pass cannot stay where it is,
and `BorrowckMir` should be a query, not a pass. But I am going to
leave those changes to a future PR.
2017-08-16 16:08:39 +02:00
Felix S. Klock II
6d6280e00c Address review comment: StatementKind::StorageDead has an effect (running dtors) relevant to borrowck. 2017-08-16 16:08:39 +02:00
Felix S. Klock II
b6528f073f Cleanup: Every BitDenotation is a DataflowOperator, so build that in.
Post-rebase: ariel confirmed `SetDiscriminant` should indeed be a mutate.
2017-08-16 16:08:39 +02:00
Felix S. Klock II
15c411d7c1 Added some documentation for the struct BlockSets in rustc_mir::dataflow. 2017-08-16 16:08:39 +02:00
Felix S. Klock II
018784afc9 MIR based borrow check (opt-in).
One can either use `-Z borrowck-mir` or add the `#[rustc_mir_borrowck]` attribute
to opt into MIR based borrow checking.

Note that regardless of whether one opts in or not, AST-based borrow
check will still run as well.  The errors emitted from AST-based
borrow check will include a "(Ast)" suffix in their error message,
while the errors emitted from MIR-based borrow check will include a
"(Mir)" suffix.

post-rebase: removed check for intra-statement mutual conflict;
replaced with assertion checking that at most one borrow is generated
per statement.

post-rebase: removed dead code: `IdxSet::pairs` and supporting stuff.
2017-08-16 16:08:28 +02:00
Felix S. Klock II
869f05a521 Factored MoveData construction code into builder submodule. 2017-08-16 15:53:27 +02:00
Felix S. Klock II
9b8b8c6aeb Move DataFlowState::{each_bit,interpret_set} method definitions to parent module.
Refactored `each_bit`, which traverses a `IdxSet`, so that the bulk of
its implementation lives in `rustc_data_structures`.
2017-08-16 15:53:27 +02:00
Felix S. Klock II
3ef1afcf6b remove now unnecessary constraint on BitDenotation for fn do_dataflow. 2017-08-16 15:53:27 +02:00
Felix S. Klock II
e8ebc902e8 Migrated some code out of dataflow::drop_flag_effects and into its parent module.
(This code is more general purpose than just supporting drop flag elaboration.)
2017-08-16 15:53:27 +02:00
Felix S. Klock II
9f6ef669d6 Added dataflow analysis for Borrows.
post-rebase: addressed review comment: rename `loc_map`/`location_map` and `rgn_map`/`region_map`.

post-rebase: remove now unnecessary `mut` decl.

post-rebase: address comments: bind iterator expr, and alpha-rename `loc`/`location` and `idx`/`index`.
2017-08-16 15:53:27 +02:00
Felix S. Klock II
cff060b960 Refactor trait BitDenotation to take Location instead of BasicBlock/usize argument pairs. 2017-08-16 15:53:27 +02:00
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