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 11 pull requests #80364

Merged
merged 26 commits into from
Dec 25, 2020
Merged

Rollup of 11 pull requests #80364

merged 26 commits into from
Dec 25, 2020

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

hencrice and others added 26 commits December 13, 2020 04:49
Also handle Tuple and Array separately, which was not explicitly checked.

Fixes rust-lang#79799.
Ran the tidy check

Following the diagnostic guide better

Diagnostic generation is now relegated to its own function in the diagnostics module.
Added tests

Fixed the ui test
Rename rustc_middle::lint::LintSource to rustc_middle::lint::LintLevelSource.
This is to clarify the difference between `LevelSource`
and `LintLevelSource`.

Appease x.py fmt.
assigment -> assignment
Also updated the mir-opt test output files.
They were never changed from the default, which you can get with
`tcx.get_attrs()`.
…=m-ou-se

Stabilize `core::slice::fill`

Tracking issue rust-lang#70758

Stabilizes the `core::slice::fill` API in Rust 1.50, adding a `memset` doc alias so people coming from C/C++ looking for this operation can find it in the docs. This API hasn't seen any changes since we changed the signature in rust-lang#71165, and it seems like the right time to propose stabilization. Thanks!

r? `@m-ou-se`
Refactored verbose print into a function

Also handle Tuple and Array separately, which was not explicitly checked.

Fixes rust-lang#79799.
Implemented a compiler diagnostic for move async mistake

Fixes rust-lang#79694

First time contributing, so I hope I'm doing everything right.
(If not, please correct me!)

This code performs a check when a move capture clause is parsed. The check is to detect if the user has reversed the async move keywords and to provide a diagnostic with a suggestion to fix it.

Checked code:
```rust
fn main() {
    move async { };
}
```

Previous output:
```txt
PS C:\Repos\move_async_test> cargo build
   Compiling move_async_test v0.1.0 (C:\Repos\move_async_test)
error: expected one of `|` or `||`, found keyword `async`
 --> src\main.rs:2:10
  |
2 |     move async { };
  |          ^^^^^ expected one of `|` or `||`

error: aborting due to previous error

error: could not compile `move_async_test`
```

New output:
```txt
PS C:\Repos\move_async_test> cargo +dev build
   Compiling move_async_test v0.1.0 (C:\Repos\move_async_test)
error: the order of `move` and `async` is incorrect
 --> src\main.rs:2:13
  |
2 |     let _ = move async { };
  |             ^^^^^^^^^^
  |
help: try switching the order
  |
2 |     let _ = async move { };
  |             ^^^^^^^^^^

error: aborting due to previous error

error: could not compile `move_async_test`
```

Is there a file/module where these kind of things are tested?
Would love some feedback 😄
…enkov

Rename rustc_middle::lint::LintSource

Rename [`rustc_middle::lint::LintSource`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/lint/enum.LintSource.html) to `rustc_middle::lint::LintLevelSource`.

This enum represents the source of a *lint level*, not a lint. This should improve code readability.

Update: Also documents `rustc_middle::lint::LevelSource` to clarify.
Add installation commands to `x` tool README
Fix elided lifetimes shown as `'_` on async functions

Closes rust-lang#63037.

r? `@tmandry` on the implementation, `@Darksonn` on the test cases.
…=GuillaumeGomez

Updated the match with the matches macro

r?````@GuillaumeGomez````
Fix typo in simplify_try.rs

assigment -> assignment
…umeGomez

Don't unnecessarily override attrs for Module

They were never changed from the default, which you can get with `tcx.get_attrs()`.
…ark-Simulacrum

BTreeMap: make test cases more explicit on failure

r? `@Mark-Simulacrum`
@rustbot rustbot added the rollup A PR which is a rollup label Dec 25, 2020
@Dylan-DPC-zz
Copy link
Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Dec 25, 2020

📌 Commit 7c7812d has been approved by Dylan-DPC

@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 Dec 25, 2020
@bors
Copy link
Contributor

bors commented Dec 25, 2020

⌛ Testing commit 7c7812d with merge 9a40539...

@bors
Copy link
Contributor

bors commented Dec 25, 2020

☀️ Test successful - checks-actions
Approved by: Dylan-DPC
Pushing 9a40539 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 25, 2020
@bors bors merged commit 9a40539 into rust-lang:master Dec 25, 2020
@rustbot rustbot added this to the 1.50.0 milestone Dec 25, 2020
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.