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 10 pull requests #73830

Merged
merged 38 commits into from
Jun 28, 2020
Merged

Rollup of 10 pull requests #73830

merged 38 commits into from
Jun 28, 2020

Conversation

Manishearth
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

poliorcetics and others added 30 commits June 11, 2020 17:44
Co-authored-by: Bastian Kauschke <bastian_kauschke@hotmail.de>
…unction

Signed-off-by: Nell Shamrell <nellshamrell@gmail.com>
This commit replaces the remaining uses of `ParamEnv::reveal_all` with
`LateContext`'s `param_env` (normally `Reveal::UserFacing`).

Signed-off-by: David Wood <david@davidtw.co>
This commit makes the JSON emitter use `-Z terminal-width` in the
"rendered" field of the JSON output.

Signed-off-by: David Wood <david@davidtw.co>
Also, implement this query for the local crate, not just foreign crates.
This is a re-attempt of rust-lang#72389 (which was reverted in rust-lang#73594)
Instead of using `ExpnKind::Desugaring` to represent operators, this PR
checks the lang item directly.
`fs::DirEntry::metadata` doesn't traverse symlinks. It is not immediately
clear what to do if you do want to traverse symlinks. This change adds
links to the two other `metadata` functions that will follow symlinks.
…ewjasper

MIR sanity check: validate types on assignment

This expands the MIR validation added by @jonas-schievink in rust-lang#72093 to also check that on an assignment, the types of both sides match.

Cc @eddyb @oli-obk
…Amanieu

Add documentation to point to `File::open` or `OpenOptions::open` instead of `is_file` to check read/write possibility

Fixes rust-lang#64170.

This adds documentation to point user towards `!is_dir` instead of `is_file` when all they want to is read from a source.

I ran `rg "fn is_file\("` to find all `is_file` methods, I hope I did not miss one.
Prepare for LLVM 11

These are just the code changes needed to build with the current LLVM master (version 11).

r? @nikic
Adds a clearer message for when the async keyword is missing from a f…

…unction

This is a somewhat simple fix for rust-lang#66731.

Under the current version of Rust, if a user has a rust file that looks like this:

```rust
fn boo (){}

async fn foo() {
    boo().await;
}

fn main() {

}
```

And they attempt to run it, they will receive an error message that looks like this:

```bash
error: incorrect use of `await`                                                                                                        --> test.rs:4:14                                                                                                                       |                                                                                                                                   4 |     boo.await();                                                                                                                    |              ^^ help: `await` is not a method call, remove the parentheses                                                                                                                                                                                              error[E0277]: the trait bound `fn() {boo}: std::future::Future` is not satisfied                                                        --> test.rs:4:5                                                                                                                        |                                                                                                                                  4  |     boo.await();                                                                                                                    |     ^^^^^^^^^ the trait `std::future::Future` is not implemented for `fn() {boo}`                                                                                                                                                                                      error: aborting due to 2 previous errors                                                                                                                                                                                                                                    For more information about this error, try `rustc --explain E0277`.
```

This is not very clear.

With the changes made in this PR, when a user compiles and runs that same rust code, they will receive an error message that looks like this:

```bash
error[E0277]: `()` is not a future.
 --> test.rs:4:5
  |
4 |     boo().await;
  |     ^^^^^^^^^^^ `()` is not a future
  |
  = help: the trait `std::future::Future` is not implemented for `()`
  = note: required by `std::future::Future::poll`
```

In the future, I think we should make this error message even clearer, perhaps through a solution like the one described in [this comment](rust-lang#66731 (comment)). However, as that potentially involves a major change proposal, I would rather get this change in now and make the error message a little clearer while an MCP is drafted and discussed.

Signed-off-by: Nell Shamrell <nellshamrell@gmail.com>
…lf-msg, r=davidtwco

Explain move errors that occur due to method calls involving `self` (take two)

This is a re-attempt of rust-lang#72389 (which was reverted in rust-lang#73594)
Instead of using `ExpnKind::Desugaring` to represent operators, this PR
checks the lang item directly.
…eal-all, r=matthewjasper

improper_ctypes: fix remaining `Reveal:All`

Fixes rust-lang#60855.

This PR replaces the remaining uses of `ParamEnv::reveal_all` with `LateContext`'s `param_env` (normally `Reveal::UserFacing`) in the improper ctypes lint.
…er, r=estebank

errors: use `-Z terminal-width` in JSON emitter

This PR makes the JSON emitter use `-Z terminal-width` in the "rendered" field of the JSON output.

r? @estebank
…-metadata, r=hanna-kruppe

Add links to fs::DirEntry::metadata

`fs::DirEntry::metadata` doesn't traverse symlinks. It is not immediately clear what to do if you do want to traverse symlinks. This change adds links to the two other `metadata` functions that will follow symlinks.
@Manishearth
Copy link
Member Author

@rustbot modify labels: +rollup
@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jun 28, 2020

📌 Commit cdb59d9 has been approved by Manishearth

@rustbot rustbot added the rollup A PR which is a rollup label Jun 28, 2020
@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 Jun 28, 2020
@bors
Copy link
Contributor

bors commented Jun 28, 2020

⌛ Testing commit cdb59d9 with merge 25687ca...

@bors
Copy link
Contributor

bors commented Jun 28, 2020

☀️ Test successful - checks-azure
Approved by: Manishearth
Pushing 25687ca to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 28, 2020
@bors bors merged commit 25687ca into rust-lang:master Jun 28, 2020
@Manishearth Manishearth deleted the rollup-8k68ysm branch July 18, 2020 01:15
@cuviper cuviper added this to the 1.46 milestone May 2, 2024
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.

None yet