Commit Graph

79545 Commits

Author SHA1 Message Date
Zack M. Davis
4b1808578a add dyn to display of dynamic (trait) type names
The `dyn Trait` syntax was stabilized in 199ee327. Resolves #49277.
2018-06-23 18:10:25 -07:00
bors
8fb1180d27 Auto merge of #51739 - Amanieu:update_rustfmt, r=Mark-Simulacrum
Update rustfmt submodule

The version of rustfmt currently shipped with nightly breaks code that uses `break 'label`. This PR updates the submodule to include the fix (https://github.com/rust-lang-nursery/rustfmt/pull/2774).
2018-06-23 22:27:30 +00:00
bors
60efbdead6 Auto merge of #51653 - mglagla:option-unreachable, r=dtolnay
Option::get_or_insert(_with): Replace unreachable! with unreachable_unchecked

Optimize codegen for both functions as the None branch is trivially not reachable.
2018-06-23 20:10:35 +00:00
Amanieu d'Antras
c44be4c231 Update Cargo.lock 2018-06-23 19:15:34 +01:00
Amanieu d'Antras
794acd7047 Update rustfmt submodule 2018-06-23 18:54:42 +01:00
bors
4fe88c05cd Auto merge of #51727 - varkor:expragain-to-exprcontinue, r=petrochenkov
Rename hir::ExprAgain to hir::ExprContinue

The current name is confusing and historical.

I also used this PR to clean up the annoying indentation in `check/mod.rs`. If that's viewed as too tangential a change, I'll split it up, but it seemed reasonable to slip it in to reduce @bors's work. It's easy to compare for the two commits individually.

r? @petrochenkov
2018-06-23 14:33:10 +00:00
bors
a51e807136 Auto merge of #51723 - estebank:abolish-ice, r=oli-obk
Accept `TyError` in `analyze_closure` to avoid ICE

Fix #51714.
2018-06-23 11:00:43 +00:00
varkor
621047b2b0 Reindent check/mod.rs 2018-06-23 11:00:02 +01:00
varkor
7ba2952af6 Rename ExprAgain to ExprContinue 2018-06-23 10:51:01 +01:00
bors
56e8f29dbe Auto merge of #51580 - cramertj:async-await, r=eddyb
async/await

This PR implements `async`/`await` syntax for `async fn` in Rust 2015 and `async` closures and `async` blocks in Rust 2018 (tracking issue: https://github.com/rust-lang/rust/issues/50547). Limitations: non-`move` async closures with arguments are currently not supported, nor are `async fn` with multiple different input lifetimes. These limitations are not fundamental and will be removed in the future, however I'd like to go ahead and get this PR merged so we can start experimenting with this in combination with futures 0.3.

Based on https://github.com/rust-lang/rust/pull/51414.
cc @petrochenkov for parsing changes.
r? @eddyb
2018-06-23 09:02:45 +00:00
bors
2ea922a96d Auto merge of #51696 - estebank:fuzzy-ice-ice, r=oli-obk
Accept `TyError` in patterns to avoid ICE on bad input

Fix #50585.
2018-06-23 06:56:12 +00:00
bors
2db44b62e7 Auto merge of #51724 - tikue:master, r=Mark-Simulacrum
Re-pub some items whose visibilities were recently reduced.

Reasons described in the most recent comments of https://github.com/rust-lang/rust/pull/51265.

tarpc can't move off of plugins until proc macros can be reexported from other crates.

Fixes https://github.com/google/tarpc/issues/191
2018-06-23 04:19:51 +00:00
Taylor Cramer
30c17ccbff Update libsyntax test 2018-06-22 20:40:52 -07:00
bors
6dc81dec44 Auto merge of #51712 - SLaabsDev:master, r=Mark-Simulacrum
Add support for current directory prefixes (#51071)

Fixes #51071
2018-06-23 02:21:04 +00:00
Taylor Cramer
a62c4aa03a Fix rustdoc and remove default impl for FnHeader 2018-06-22 17:27:58 -07:00
bors
f9686334ac Auto merge of #51697 - estebank:once-used-lifetime-label, r=oli-obk
Add label to lint for lifetimes used once

```
error: lifetime parameter `'a` only used once
  --> $DIR/fn-types.rs:19:10
   |
LL |   a: for<'a> fn(&'a u32), //~ ERROR `'a` only used once
   |          ^^      -- ...is used only here
   |          |
   |          this lifetime...
```
2018-06-23 00:06:54 +00:00
Tim Kuehn
0c33e0ae13 Re-reexport some items that were recently made crate-private. 2018-06-22 16:23:25 -07:00
Taylor Cramer
9a310abf79 Remove impl trait names and move bits of await into a function 2018-06-22 16:08:07 -07:00
Esteban Küber
8ddf9a3360 Accept TyError in analyze_closure to avoid ICE 2018-06-22 15:35:52 -07:00
bors
b0e41f1038 Auto merge of #51482 - GuillaumeGomez:table-display, r=QuietMisdreavus
Greatly improve tables display in docs

Fixes #51454.

r? @QuietMisdreavus

Before:

<img width="1440" alt="screen shot 2018-06-10 at 22 43 52" src="https://user-images.githubusercontent.com/3050060/41206138-cc61b2b4-6cff-11e8-9b6f-0b1e435d4b1b.png">

After:

<img width="1440" alt="screen shot 2018-06-10 at 23 33 16" src="https://user-images.githubusercontent.com/3050060/41207049-d455c03c-6d0e-11e8-968f-d4fccaeb4265.png">
2018-06-22 22:02:10 +00:00
bors
cbc4c8380f Auto merge of #51681 - varkor:rustc_deprecated-future-deprecation, r=petrochenkov
Support future deprecation for rustc_deprecated

Follow-up to #49179 to allow `since` parameters to be set to future versions of Rust and correspondingly to not be treated as deprecated until that version. This is required for #30459 to be completed (though we'll need to wait until this hits beta).
2018-06-22 19:55:30 +00:00
Taylor Cramer
0b2d2d1dc5 Remove unused map_slice 2018-06-22 12:12:53 -07:00
Taylor Cramer
ee51a3c10a Review nits and updates
Move future_from_generator out of raw
Update await to use $crate
Renumber errors
2018-06-22 11:36:01 -07:00
bors
8f024479d4 Auto merge of #51670 - estebank:issue-51634, r=oli-obk
Don't suggest incorrect syntax

Fix #51634.
2018-06-22 17:51:02 +00:00
bors
4dc2d745b9 Auto merge of #51704 - kennytm:rollup, r=kennytm
Rollup of 6 pull requests

Successful merges:

 - #51158 (Mention spec and indented blocks in doctest docs)
 - #51629 (Do not consume semicolon twice while parsing local statement)
 - #51637 (Update zx_cprng_draw_new on Fuchsia)
 - #51664 (make more libsyntax methods public)
 - #51666 (Disable probestack when GCOV profiling is being used)
 - #51703 (Recognize the extra "LLVM tools versions" argument to build-manifest.)

Failed merges:

r? @ghost
2018-06-22 15:26:52 +00:00
Steven Laabs
475405b6af Handle current directory prefix for parsing command arguments in bootstrap test command. 2018-06-22 09:09:31 -05:00
Steven Laabs
be3cd464fd Added stripping current directory prefixes when comparing suite path names 2018-06-22 09:09:31 -05:00
bors
01dbfdaf4f Auto merge of #51184 - lambtowolf:master, r=nikomatsakis
Issue #50974 : Suboptimal error in case of duplicate `,` in struct constructor

Fixes #50974
2018-06-22 11:10:20 +00:00
Niko Matsakis
a99767f64f
add an explanatory comment for recovery behavior 2018-06-22 11:38:38 +02:00
Lamb
815765dade
Issue #50974: Fix compilation error and test 2018-06-22 11:38:38 +02:00
Maerten
fadb86f25d
Fix when the help message is displayed
Only display the "remove this comma" suggestion when followed by an identifier
2018-06-22 11:38:38 +02:00
Lamb
6c962e3ec4
Issue #50974: Adding issue number in the test 2018-06-22 11:38:38 +02:00
Lamb
5c022af4a4
Issue #50974: Adding tests 2018-06-22 11:38:38 +02:00
Lamb
783815d219
Issue #50974: Change text of suggestion to be more direct 2018-06-22 11:38:38 +02:00
Lamb
7969b78222
Issue #50974: Suboptimal error in case of duplicate , in struct constructor 2018-06-22 11:38:38 +02:00
kennytm
d41cb9992f
Rollup merge of #51703 - kennytm:fix-51699, r=nrc
Recognize the extra "LLVM tools versions" argument to build-manifest.

Fix #51699.
2018-06-22 16:50:45 +08:00
kennytm
a39d93d899
Rollup merge of #51666 - marco-c:disable_probestack, r=nagisa
Disable probestack when GCOV profiling is being used

If I compile Firefox with gcov profiling enabled, Firefox crashes at startup because of probestack.
Since it's disabled for PGO, I think it makes sense to disable it for gcov too.
2018-06-22 16:50:44 +08:00
kennytm
bac6cc98e5
Rollup merge of #51664 - jebrosen:pub_parse_methods2, r=Mark-Simulacrum
make more libsyntax methods public

Followup for #51502, which was sufficient only for the latest stable release of Rocket. The `master` branch uses a few more. I plan to reimplement the deleted method `parse_seq` in Rocket (see SergioBenitez/Rocket#666), rather than resurrecting it in libsyntax.

r? @Mark-Simulacrum
2018-06-22 16:50:43 +08:00
kennytm
e920d21d78
Rollup merge of #51637 - abarth:new_prng, r=cramertj
Update zx_cprng_draw_new on Fuchsia

Fuchsia is changing the semantics for zx_cprng_draw and
zx_cprng_draw_new is a temporary name for the new semantics.
2018-06-22 16:50:42 +08:00
kennytm
aa3a6273af
Rollup merge of #51629 - topecongiro:multiple-semicolon-in-local-span, r=petrochenkov
Do not consume semicolon twice while parsing local statement

The span for a `let` statement includes multiple semicolons. For example,

```rust
    let x = 2;;;
//  ^^^^^^^^^^^ The span for the above statement.
```

This PR fixes it.

cc https://github.com/rust-lang-nursery/rustfmt/issues/2791.
2018-06-22 16:50:41 +08:00
kennytm
8ef9e2c260
Rollup merge of #51158 - ogham:patch-1, r=steveklabnik
Mention spec and indented blocks in doctest docs

Fixes #49717.

This commit adds a new section to the Documentation Test docs, which briefly mentions indented code blocks, and links to the CommonMark specification for both.

I’m not sure about saying "fenced code blocks the more popular choice in the Rust community” because it seems like I’m speaking for everyone, but I can’t think of a better way to phrase it!
2018-06-22 16:50:39 +08:00
bors
e70ff68aaf Auto merge of #51660 - lqd:the-MIRnistry-of-walks, r=nikomatsakis
NLL: Walk the MIR only once for the "unused mut" lint

Turns the quadratic loop gathering local variable assignments into a single MIR walk, and brings down the number of `super_mir` calls generated from `do_mir_borrowck` to the expected levels seen in `nll::replace_regions_in_mir` and `nll::compute_regions`, i.e. on clap: 1883 `super_mir` calls instead of 8011.

The limited perf numbers I could gather on my machines look to be what we expected: `clap-check` seems to be gaining back a lot of the 7% we previously saw in `visit_mir`.

Fixes #51641.

r? @nikomatsakis
2018-06-22 08:34:26 +00:00
kennytm
07ad6e042c
Recognize the extra "LLVM tools versions" argument to build-manifest.
Fix #51699.
2018-06-22 16:22:01 +08:00
bors
7dae5c0e06 Auto merge of #51686 - nikomatsakis:issue-51415-borrowck-match-default-bindings-bug, r=eddyb
yet another "old borrowck" bug around match default bindings

We were getting the type of the parameter from its pattern, but that didn't include adjustments. I did a `ripgrep` around and this seemed to be the only affected case.

The reason this didn't show up as an ICE earlier is that mem-categorization is lenient with respect to weird discrepancies. I am going to add more delay-span-bug calls shortly around that (I'll push onto the PR).

This example is an ICE, but I presume that there is a way to make a soundness example out of this -- it basically ignores borrows occuring inside match-default-bindings in a closure, though only if the implicit deref is at the top-level. It happens though that this occurs frequently in iterators, which often give a `&T` parameter.

Fixes #51415
Fixes #49534

r? @eddyb
2018-06-22 06:36:11 +00:00
Taylor Cramer
85e4866320 PathParameters -> GenericArgs fixes 2018-06-21 23:24:51 -07:00
Taylor Cramer
083a7eaa1a Add path parameters to std_path 2018-06-21 22:38:06 -07:00
Taylor Cramer
d814160d82 Fix test using ExprKind::Closure 2018-06-21 22:38:06 -07:00
Taylor Cramer
e4c89d7b50 Truncate errors to make tidy happy 2018-06-21 22:38:05 -07:00
Taylor Cramer
fb1e13b8e2 Fix parse-fail tests that now mention async 2018-06-21 22:38:05 -07:00
Taylor Cramer
0db0622de4 Move async edition check to the current span 2018-06-21 22:38:05 -07:00