Commit Graph

66807 Commits

Author SHA1 Message Date
Corey Farwell
a4387d54dc Rollup merge of #43891 - Fourchaux:master, r=steveklabnik
Fix typos & us spellings

Fixing some typos and non en-US spellings.

(Update of PR https://github.com/rust-lang/rust/pull/42812 )
2017-08-17 10:44:07 -04:00
Oliver Schneider
9346fe9d6e Upgrade a comment to a doc comment 2017-08-17 16:21:55 +02:00
Oliver Schneider
7f5f92218a Upgrade a comment to a doc comment 2017-08-17 16:15:40 +02:00
Seiichi Uchida
567b9b761b Update ui tests 2017-08-17 21:59:19 +09:00
Seiichi Uchida
ceb2c240a6 Include the closing paren to the span of ast::NestedMetaItem 2017-08-17 21:58:01 +09:00
Seiichi Uchida
ea222160d0 Use respan() 2017-08-17 21:24:19 +09:00
bors
dd39ecf368 Auto merge of #43902 - michaelwoerister:fix-mir-passes-promoted, r=arielb1
Run MIR passes on promoted temporaries again.

This seems to have been broken some time in the past (maybe here: 9c154a67bf (diff-2f8e8805126c84b2be3f0967ffa0af28L162)).

r? @arielb1
2017-08-17 10:58:12 +00:00
pravic
cb4a2d5078 Fix ES5 regression with shorthand names.
Reverts 1b6c9605e4.
2017-08-17 12:41:57 +03:00
Anthony Clays
fa346fc5d6
Fixed typo in RefCell::get_mut 2017-08-17 10:57:17 +02:00
Michael Zapata
3ffe01f40a
refactor(mir): remove unused argument
Small cleanup that shouldn't have any impact
2017-08-17 19:01:59 +12:00
bors
a7e001833e Auto merge of #43878 - kennytm:fix-43869-put-impl-trait-out-of-the-loop, r=alexcrichton
Exclude `impl Trait` functions from everybody_loops.

Fixes #43869.

cc #34511.
2017-08-17 06:19:38 +00:00
Corey Farwell
1065ad418e Minor rewrite of char primitive unicode intro.
Opened primarily to address #36998.
2017-08-17 00:36:30 -04:00
bors
e407206534 Auto merge of #43867 - GuillaumeGomez:useless-help, r=nikomatsakis
Remove useless help part

Part of #32658.

I think this error should be splitted into two parts, each more specific (`anonymous function` vs `type method`).
2017-08-17 03:42:26 +00:00
Ian Douglas Scott
872f532641
Enable unwinding panics on Redox 2017-08-16 17:21:50 -07:00
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
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