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 #89047

Merged
merged 24 commits into from
Sep 17, 2021
Merged

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

FabianWolff and others added 24 commits September 12, 2021 23:07
…p of files

This is a straightforward wrapper that uses the existing helpers for C
string handling and errno handling.

Having this available is convenient for UNIX utility programs written in
Rust, and avoids having to call unsafe functions like `libc::chown`
directly and handle errors manually, in a program that may otherwise be
entirely safe code.

In addition, these functions provide a more Rustic interface by
accepting appropriate traits and using `None` rather than `-1`.
If #![feature] is used outside the nightly channel for only lib
features, the check will be delayed to the stability pass after
parsing. This is done so that appropriate help messages can be shown if
the #![feature] has been used needlessly
…op, r=estebank

Emit clearer diagnostics for parens around `for` loop heads

Fixes rust-lang#63113
r? `@estebank`
Point to closure when emitting 'cannot move out' for captured variable

Attempts to fix rust-lang#87456. The error message now points to the capturing closure, but I was not able to explain _why_ the closure implements `Fn` or `FnMut` (`TypeckResults::closure_kind_origins` did not contain anything for the closure in question).

cc `@Aaron1011`
…ounds, r=estebank

Recover invalid assoc type bounds using `==`

Fix rust-lang#87493
r? `@estebank`
…k-Simulacrum

Improve build command for compiler docs

It was rather complicated to document rustc crates. With this, you can directly run:

```console
x.py doc compiler
x.py doc compiler/rustc_hir_pretty
```

The second commit adds the handling of the `--open` flag.

r? `@Mark-Simulacrum`
…asper

Do not issue E0071 if a type error has already been reported

Fixes rust-lang#88844. A suggested fix is already included in the error message for E0412, so with my changes, E0071 is simply not emitted anymore if the type in question is a "type error". This makes sense, I think, because we cannot confidently state that something is "not a struct" if we couldn't resolve it properly; and it's unnecessary to pollute the output with this additional error message, as it is a direct consequence of the former error.

I have also addressed the issue mentioned in rust-lang#88844 (comment) by changing the fixed example in the documentation to more closely match the erroneous code example.
Fix handling of `hir::GenericArg::Infer` in `wrong_number_of_generic_args.rs`

Fixes rust-lang#87563. More precisely, I have fixed the "index out of bounds" error, which is what rust-lang#87563 is about. The example given there still ICEs due to running into this `todo!()`, but I'd say that this is a separate issue:
https://github.com/rust-lang/rust/blob/c3c0f80d6081092faff801542dd82f0e2420152b/compiler/rustc_typeck/src/astconv/mod.rs#L460-L463
Add chown functions to std::os::unix::fs to change the owner and group of files

This is a straightforward wrapper that uses the existing helpers for C
string handling and errno handling.

Having this available is convenient for UNIX utility programs written in
Rust, and avoids having to call unsafe functions like `libc::chown`
directly and handle errors manually, in a program that may otherwise be
entirely safe code.

In addition, these functions provide a more Rustic interface by
accepting appropriate traits and using `None` rather than `-1`.
Allow `panic!("{}", computed_str)` in const fn.

Special-case `panic!("{}", arg)` and translate it to `panic_display(&arg)`. `panic_display` will behave like `panic_any` in cosnt eval and behave like `panic!(format_args!("{}", arg))` in runtime.

This should bring Rust 2015 and 2021 to feature parity in terms of `const_panic`; and hopefully would unblock the stabilisation of rust-lang#51999.

`@rustbot` modify labels: +T-compiler +T-libs +A-const-eval +A-const-fn

r? `@oli-obk`
Add rustdoc version into the help popup

After a discussion with a rustdoc user about a specific behaviour, we realized we were not talking about the same version. To add on top of it, it was actually not that simple to find out the version since it was hosted documentation.

So to simplify things, I added the version into the help popup:

![Screenshot from 2021-09-16 10-45-52](https://user-images.githubusercontent.com/3050060/133581128-b93b460a-e1cb-4a31-9f2f-97c7a916cfcc.png)

Does the version format looks or would you prefer that I add more information? We can also add the commit hash, commit date, host and release.

cc `@rust-lang/rustdoc`
r? `@jyn514`
Suggest removing `#![feature]` for library features that have been stabilized

Issue: rust-lang#88802
Delayed the check if #![feature] has been used to enable lib features in a non-nightly build to occur after TyCtxt has been constructed.
@rustbot rustbot added the rollup A PR which is a rollup label Sep 17, 2021
@GuillaumeGomez
Copy link
Member Author

@bors: r+ p=10 rollup=never

@bors
Copy link
Contributor

bors commented Sep 17, 2021

📌 Commit 101a88f has been approved by GuillaumeGomez

@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 Sep 17, 2021
@bors
Copy link
Contributor

bors commented Sep 17, 2021

⌛ Testing commit 101a88f with merge 207d955...

@bors
Copy link
Contributor

bors commented Sep 17, 2021

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 207d955 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 17, 2021
@bors bors merged commit 207d955 into rust-lang:master Sep 17, 2021
@rustbot rustbot added this to the 1.57.0 milestone Sep 17, 2021
@bors bors mentioned this pull request Sep 17, 2021
@GuillaumeGomez GuillaumeGomez deleted the rollup-29gmr02 branch September 17, 2021 18:50
@pnkfelix
Copy link
Member

Weekly performance triage. This PR was identified as the source of a +1.9% regression in instruction counts for webrender-wrench-check.

I don't have any intuition about that benchmark or why this rollup would significantly affect its compilation time, though.

@pnkfelix pnkfelix added the perf-regression Performance regression. label Sep 21, 2021
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. perf-regression Performance regression. 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