Skip to content

Rollup of 8 pull requests #124910

New issue

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

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

Already on GitHub? # to your account

Merged
merged 23 commits into from
May 8, 2024
Merged

Rollup of 8 pull requests #124910

merged 23 commits into from
May 8, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

pietroalbini and others added 23 commits April 14, 2024 18:45
They can just be written as `use rustc_foo::bar`, which is far more
standard. (I didn't even know that a `crate::` prefix was valid.)
This change ignores the RUSTC_WRAPPER_REAL environment variable if it's
set to the empty string. This matches cargo behaviour and allows users
to easily shadow a globally set RUSTC_WRAPPER (which they might have set
for non-rustc projects).
Fixes an ICE that occurred when the struct in question has an error
…Nilstrieb

Remove braces when fixing a nested use tree into a single item

[Back in 2019](rust-lang#56645) I added rustfix support for the `unused_imports` lint, to automatically remove them when running `cargo fix`. For the most part this worked great, but when removing all but one childs of a nested use tree it turned `use foo::{Unused, Used}` into `use foo::{Used}`. This is slightly annoying, because it then requires you to run `rustfmt` to get `use foo::Used`.

This PR automatically removes braces and the surrouding whitespace when all but one child of a nested use tree are unused. To get it done I had to add the span of the nested use tree to the AST, and refactor a bit the code I wrote back then.

A thing I noticed is, there doesn't seem to be any `//@ run-rustfix` test for fixing the `unused_imports` lint. I created a test in `tests/suggestions` (is that the right directory?) that for now tests just what I added in the PR. I can followup in a separate PR to add more tests for fixing `unused_lints`.

This PR is best reviewed commit-by-commit.
…r=dtolnay

Generic `NonZero` post-stabilization changes.

Tracking issue: rust-lang#120257

r? ``@dtolnay``
crashes: add lastest batch of crash tests
Make sure we don't deny macro vars w keyword names

`$async:ident`, etc are all valid.

Fixes rust-lang#124862
…, r=compiler-errors

Simplify `use crate::rustc_foo::bar` occurrences.

They can just be written as `use rustc_foo::bar`, which is far more standard. (I didn't even know that a `crate::` prefix was valid.)

r? ``@eholk``
Ignore empty RUSTC_WRAPPER in bootstrap

This change ignores the RUSTC_WRAPPER_REAL environment variable if it's set to the empty string. This matches cargo behaviour and allows users to easily shadow a globally set RUSTC_WRAPPER (which they might have set for non-rustc projects).

I hit this because I have RUSTC_WRAPPER set to `sccache` in my fish universal env vars, and I can only shadow those locally with an empty string, I can't unset it entirely.
…ers, r=compiler-errors

Reapply the part of rust-lang#124548 that bors forgot

rust-lang#124548 (comment)
r? compiler-errors
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels May 8, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Collaborator

bors commented May 8, 2024

📌 Commit 782ef18 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 8, 2024
@bors
Copy link
Collaborator

bors commented May 8, 2024

⌛ Testing commit 782ef18 with merge 87293c9...

@bors
Copy link
Collaborator

bors commented May 8, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 87293c9 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 8, 2024
@bors bors merged commit 87293c9 into rust-lang:master May 8, 2024
7 checks passed
@rustbot rustbot added this to the 1.80.0 milestone May 8, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#123344 Remove braces when fixing a nested use tree into a single i… f224850cc48fd21f753586fcef57f113796c190c (link)
#124587 Generic NonZero post-stabilization changes. 84870562b8b5580070c6f8cb2f40a18973e0ed3a (link)
#124775 crashes: add lastest batch of crash tests 16e57d89282d6ebfc9f456ee1905dba06847cd1e (link)
#124869 Make sure we don't deny macro vars w keyword names adfb84b6ff6ceee2cf03e75ae6ea58082f295715 (link)
#124876 Simplify use crate::rustc_foo::bar occurrences. 2603084db436ef8dd4cd7d8928f66c79ce239754 (link)
#124892 Update cc crate to v1.0.97 69bf7fb3359ab1d9983caa84c7a279cd8fa8f66b (link)
#124903 Ignore empty RUSTC_WRAPPER in bootstrap da29bfa70fd822ea4bbe8345dd05e36f83fb5908 (link)
#124909 Reapply the part of #124548 that bors forgot b8010b341ae8a15f6d4d7f46218e609b3f52182e (link)

previous master: ec1b69852f

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (87293c9): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.0% [1.0%, 3.0%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.8% [-2.9%, -0.5%] 5
Improvements ✅
(secondary)
-2.4% [-2.7%, -2.2%] 2
All ❌✅ (primary) -0.7% [-2.9%, 3.0%] 7

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.0% [-3.6%, -2.1%] 3
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 675.971s -> 675.036s (-0.14%)
Artifact size: 315.94 MiB -> 315.79 MiB (-0.05%)

@matthiaskrgr matthiaskrgr deleted the rollup-lo1uvdn branch September 1, 2024 17:35
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.