Commit Graph

66763 Commits

Author SHA1 Message Date
bors
59ccba995d Auto merge of #43939 - frewsxcv:rollup, r=frewsxcv
Rollup of 9 pull requests

- Successful merges: #43891, #43905, #43912, #43914, #43915, #43916, #43920, #43928, #43930
- Failed merges:
2017-08-17 17:10:25 +00:00
Oliver Schneider
e0ba29c413
Improve placement of use suggestions 2017-08-17 18:16:15 +02:00
Corey Farwell
235fb23e55 Rollup merge of #43930 - pravic:es5-revert-shorthand, r=frewsxcv
Fix ES5 regression with shorthand names.

Reverts 1b6c9605e4.

I appreciate new features and syntax in Rust, but seriously, don't rewrite anything. Especially if this **breaks** documentation of language itself and every crate hosted at docs.rs.
2017-08-17 10:44:15 -04:00
Corey Farwell
58f3041eca Rollup merge of #43928 - anthonyclays:anthonyclays-refcell-docfix, r=QuietMisdreavus
Fixed typo in RefCell::get_mut

"[...] is usually not you want." => "[...] is usually not what you want."
2017-08-17 10:44:14 -04:00
Corey Farwell
584dacf1f9 Rollup merge of #43920 - michael-zapata:cleanup/mir, r=arielb1
refactor(mir): remove unused argument

Small cleanup that shouldn't have any impact, as it's a small thing introduced in #43772
2017-08-17 10:44:13 -04:00
Corey Farwell
c140417515 Rollup merge of #43916 - integer32llc:cargo-docs-redirect, r=alexcrichton
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.

When I run `./x.py doc`, this creates a `build/x86_64-apple-darwin/doc/cargo/index.html` file that contains a meta redirect to doc.crates.io. As I understand rust-central-station to work, this should be what we need to make `doc.rust-lang.org/cargo` to work.

r? @alexcrichton and/or @steveklabnik
2017-08-17 10:44:12 -04:00
Corey Farwell
32bd145f60 Rollup merge of #43915 - adrian5:patch-1, r=sfackler
Fix typo in doc
2017-08-17 10:44:11 -04:00
Corey Farwell
12bbae95f4 Rollup merge of #43914 - steveklabnik:update-books, r=QuietMisdreavus
Update the books for next release
2017-08-17 10:44:10 -04:00
Corey Farwell
fa7900933f Rollup merge of #43912 - Songbird0:e0106_field_lifetimes, r=GuillaumeGomez
E0106: field lifetimes

Hi there,

I've added an example for custom type lifetimes located in another `struct` field.

cc @GuillaumeGomez
2017-08-17 10:44:09 -04:00
Corey Farwell
1512e44c17 Rollup merge of #43905 - partim:master, r=steveklabnik
Document that `std:#️⃣:Hasher::finish()` does not reset the hasher.

Clarifies the fact that `finish()` doesn’t in fact end or reset the hasher. This was surprising to me …

Follows up on and fixes #43763
2017-08-17 10:44:08 -04:00
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