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 8 pull requests #132661

Merged
merged 17 commits into from
Nov 6, 2024
Merged

Rollup of 8 pull requests #132661

merged 17 commits into from
Nov 6, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

mrkajetanp and others added 17 commits October 31, 2024 11:59
Add a new 'pc' option to -Z branch-protection for aarch64 that
enables the use of PC as a diversifier in PAC branch protection code.

When the pauth-lr target feature is enabled in combination
with -Z branch-protection=pac-ret,pc, the new 9.5-a instructions
(pacibsppc, retaasppc, etc) will be generated.
Use the right span when encountering an enum variant followed by an associated item so we don't lose the associated item in the resulting code.

Do not suggest the thing twice, once as a removal of the associated item and a second time as a typo suggestion.
also move internal const_panic helpers to a better location
…-lr, r=davidtwco

rustc_codegen_llvm: Add a new 'pc' option to branch-protection

Add a new 'pc' option to -Z branch-protection for aarch64 that enables the use of PC as a diversifier in PAC branch protection code.

When the pauth-lr target feature is enabled in combination with -Z branch-protection=pac-ret,pc, the new 9.5-a instructions (pacibsppc, retaasppc, etc) will be generated.
…, r=Kobzol

CI: switch 7 linux jobs to free runners

try-job: x86_64-gnu-aux
try-job: x86_64-gnu-nopt
try-job: x86_64-gnu-tools
…s, r=estebank

Suggest fixing typos and let bindings at the same time

Fixes rust-lang#132483

Currently, a suggestion for adding a let binding won't be shown if we suggest fixing a typo. This changes that behavior to always show both, if possible. Essentially, this turns the suggestion from
```rust
error[E0425]: cannot find value `x2` in this scope
 --> src/main.rs:4:5
  |
4 |     x2 = 2;
  |     ^^ help: a local variable with a similar name exists: `x1`

For more information about this error, try `rustc --explain E0425`.
```

to
```rust
error[E0425]: cannot find value `x2` in this scope
 --> src/main.rs:4:5
  |
4 |     x2 = 2;
  |     ^^
  |
help: a local variable with a similar name exists
  |
4 |     x1 = 2;
  |     ~~
help: you might have meant to introduce a new binding
  |
4 |     let x2 = 2;
  |     +++

For more information about this error, try `rustc --explain E0425`.
```

for the following code:
```rust
fn main() {
    let x1 = 1;
    x2 = 2;
}
```

The original behavior only shows the suggestion for a let binding if a typo suggestion wasn't already displayed. However, this falls apart in the cases like the one above where we have multiple similar variables. I don't think it makes sense to hide this suggestion if there's a similar variable, since that defeats the purpose of this suggestion in that case (it's meant to help those coming from languages like Python).
…odule-exclusion-list-between-tidy-and-rustfmt, r=jieyouxu

chore(style): sync submodule exclusion list between tidy and rustfmt

As asked in the FIXME comments
Properly suggest `E::assoc` when we encounter `E::Variant::assoc`

Use the right span when encountering an enum variant followed by an associated item so we don't lose the associated item in the resulting code.

Do not suggest the thing twice, once as a removal of the associated item and a second time as a typo suggestion.
…r=oli-obk

add const_eval_select macro to reduce redundancy

I played around a bit with a macro to make const_eval_select invocations look a bit nicer and avoid repeating the argument lists. Here's what I got. What do you think?

I didn't apply this everywhere yet because I wanted to gather feedback first.

The second commit moves the macros from rust-lang#132542 into a more sensible place. It didn't seem worth its own PR and would conflict with this PR if done separately.

Cc ``@oli-obk`` ``@saethlin`` ``@tgross35``

try-job: dist-aarch64-msvc
Do not filter empty lint passes & re-do CTFE pass

Some structs implement `LintPass` without having a `Lint` associated with them rust-lang#125116 broke that behaviour by filtering them out. This PR ensures that lintless passes are not filtered out.
…er-errors

Add documentation on `ast::Attribute`

I was working again with attributes in clippy recently and I often find myself in need to read the source code to ensure it's doing what I want.

Instead, a bit of documentation would allow me (and hopefully others) to skip this step.
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations 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-infra Relevant to the infrastructure 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. rollup A PR which is a rollup labels Nov 5, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Nov 5, 2024

📌 Commit 4346249 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 5, 2024
@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 Nov 5, 2024
@bors
Copy link
Contributor

bors commented Nov 5, 2024

⌛ Testing commit 4346249 with merge 4a91ff6...

@bors
Copy link
Contributor

bors commented Nov 6, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 4a91ff6 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 6, 2024
@bors bors merged commit 4a91ff6 into rust-lang:master Nov 6, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 6, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#132259 rustc_codegen_llvm: Add a new 'pc' option to branch-protect… dff04072613786d2e80a44b1b99fe98d8e25146e (link)
#132409 CI: switch 7 linux jobs to free runners a3ca2d6b3a3363f95650c44e27c685be422a84d7 (link)
#132498 Suggest fixing typos and let bindings at the same time 0045ef9e13d8af9bebe0f63467d49a6823f63c9a (link)
#132524 chore(style): sync submodule exclusion list between tidy an… 4111c00d2f46b4fe93032d03b8cef1698f600e7b (link)
#132567 Properly suggest E::assoc when we encounter `E::Variant::… 138f60e5f6cf05afcd6acc935c4e38e7d66c2e54 (link)
#132571 add const_eval_select macro to reduce redundancy aa67c1fcc24c663f8fee13d11b0bde0d75c26324 (link)
#132637 Do not filter empty lint passes & re-do CTFE pass 6db5712032092b4cd58cc23318c96757786f7d79 (link)
#132642 Add documentation on ast::Attribute 07f4e462a668fba325cf797571e65b9a68d87d93 (link)

previous master: bc5cf994db

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 (4a91ff6): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.3% [-2.3%, -2.3%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -0.4%, secondary 1.3%)

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)
1.1% [1.1%, 1.1%] 1
Regressions ❌
(secondary)
1.3% [0.6%, 3.3%] 4
Improvements ✅
(primary)
-1.8% [-1.8%, -1.8%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.4% [-1.8%, 1.1%] 2

Cycles

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

Binary size

Results (primary 0.0%, secondary 0.0%)

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.0% [0.0%, 0.0%] 21
Regressions ❌
(secondary)
0.0% [0.0%, 0.1%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [0.0%, 0.0%] 21

Bootstrap: 779.813s -> 779.618s (-0.03%)
Artifact size: 335.27 MiB -> 335.31 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. PG-exploit-mitigations Project group: Exploit mitigations 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-infra Relevant to the infrastructure 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.