Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #65907

Merged
merged 21 commits into from
Oct 29, 2019
Merged

Rollup of 9 pull requests #65907

merged 21 commits into from
Oct 29, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Oct 28, 2019

Successful merges:

Failed merges:

r? @ghost

GuillaumeGomez and others added 21 commits October 23, 2019 16:22
…ation event.

Before this commit, we had an event that would only track the compression step
for proc-macros and Rust dylibs. After the commit we measure the time for
acutally generating the crate metadata bytes.
- Detect `,` and `:` typos where `;` was intended.
- When the next token could have been the start of a new statement,
  detect a missing semicolon.
This commit adds a suggestion to add the
`#![feature(const_in_array_repeat_expression)]` attribute to the crate
when a promotable expression is used in a repeat expression.

Signed-off-by: David Wood <david@davidtw.co>
…-E0587, r=Dylan-DPC

Add long error explanation for E0587

Part of rust-lang#61137.

r? @kinnison
…ntril

Use heuristics to recover parsing of missing `;`

- Detect `,` and `:` typos where `;` was intended.
- When the next token could have been the start of a new statement,
  detect a missing semicolon.

Fix rust-lang#48160, fix rust-lang#44767 (after adding note about statements).
…st-placeholder, r=eddyb

Correct handling of type flags with `ConstValue::Placeholder`

This fixes a mistake, but not rust-lang#65623.

r? @eddyb
rustc: use IndexVec<DefIndex, T> instead of Vec<T>.

Now that `DefIndex` is a proper index type, we can do that.
There was also an unnecessary `Option` I removed, I wonder if that has perf implications.
…error, r=ecstatic-morse

suggest `const_in_array_repeat_expression` flag

This PR adds a suggestion to add the `#![feature(const_in_array_repeat_expression)]` attribute to the crate when a promotable expression is used in a repeat expression and the feature gate is not enabled.

Unfortunately, this ended up being a little bit more complex than I anticipated, which may not have been worth it given that this would all be removed when the feature is stabilized. However, with rust-lang#65732 and rust-lang#65737 being open, and the feature gate having not been being suggested to potential users, the feature might not be stabilized in a while, so maybe this is worth landing.

cc @Centril (addresses [this comment](rust-lang#61749 (comment)))
r? @ecstatic-morse (opened issues related to RFC 2203 recently)
doc: introduce `once` in `iter::chain` document

I find it hard to find which one to use with `chain` when I only need to
chain one value. Also [`once`][1] talks about `chain`.

[1]: https://doc.rust-lang.org/nightly/std/iter/fn.once.html
… r=wesleywiser

self-profiling: Record something more useful for crate metadata generation event.

Before this commit, we had an event that would only track the compression step
for proc-macros and Rust dylibs. After the commit we measure the time for
acutally generating the crate metadata bytes.

r? @wesleywiser
…aging, r=Centril

Output previous stable  error messaging when using stable build.

Fixes rust-lang#65254

As I had mentioned previously there I have the logic running right now however I'm not getting the exact same syntax highlighting as there was originally for this error.

I'm currently getting the following:
```
error: expected expression, found statement (`let`)
 --> src/main.rs:2:14
  |
2 |     let x = (let y = 6);
  |              ^^^^^^^^^
  |
  = note: variable declaration using `let` is a statement
```

I'd like to get the following instead:

```
  |     let x = (let y = 6);
  |              ^^^
```

My current understanding is that the `span` being passed into `lower_expr_let` is coming from `lowering.rs`. I still don't know how the byte range is calculated for the erroneous syntax and need to look into it a bit more. In the meantime does anybody have any hints/tips regarding this??
@Centril
Copy link
Contributor Author

Centril commented Oct 28, 2019

@bors r+ p=9 rollup=never

@bors
Copy link
Contributor

bors commented Oct 28, 2019

📌 Commit 30431a3 has been approved by Centril

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 28, 2019
@Centril Centril added the rollup A PR which is a rollup label Oct 28, 2019
@bors
Copy link
Contributor

bors commented Oct 28, 2019

⌛ Testing commit 30431a3 with merge cac6821...

bors added a commit that referenced this pull request Oct 28, 2019
Rollup of 9 pull requests

Successful merges:

 - #65563 (Add long error explanation for E0587)
 - #65640 (Use heuristics to recover parsing of missing `;`)
 - #65643 (Correct handling of type flags with `ConstValue::Placeholder`)
 - #65825 (rustc: use IndexVec<DefIndex, T> instead of Vec<T>.)
 - #65858 (suggest `const_in_array_repeat_expression` flag)
 - #65877 (doc: introduce `once` in `iter::chain` document)
 - #65887 (doc: mention `get(_mut)` in Vec)
 - #65891 (self-profiling: Record something more useful for crate metadata generation event.)
 - #65893 (Output previous stable  error messaging when using stable build.)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Oct 29, 2019

☀️ Test successful - checks-azure
Approved by: Centril
Pushing cac6821 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 29, 2019
@bors bors merged commit 30431a3 into rust-lang:master Oct 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants