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 9 pull requests #137838

Merged
merged 23 commits into from
Mar 1, 2025
Merged

Rollup of 9 pull requests #137838

merged 23 commits into from
Mar 1, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

makai410 and others added 23 commits February 17, 2025 21:19
There is a `visit_inline_const` visitor method and it is used instead.
Provide a better suggestion message, and make the suggestion verbose.

```
error[E0703]: invalid ABI: found `riscv-interrupt`
  --> $DIR/riscv-discoverability-guidance.rs:17:8
   |
LL | extern "riscv-interrupt" fn isr() {}
   |        ^^^^^^^^^^^^^^^^^ invalid ABI
   |
   = note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions
help: there's a similarly named valid ABI `"riscv-interrupt-m"`
   |
LL | extern "riscv-interrupt-m" fn isr() {}
   |                        ++
```
…r=compiler-errors

Defer repeat expr `Copy` checks to end of type checking

Fixes rust-lang#110443

Defers repeat expr checks that the element type is `Copy` when the length is > 1 (or generic) to end of typeck so that under `generic_arg_infer` repeat exprs are able to have an inferred count, e.g. `let a: [_; 1] = [String::new(); _];`.

Currently the deferring is gated under `generic_arg_infer` though I intend to separately types FCP deferring the checks even outside of `generic_arg_infer` if we wind up not going with an alternative.
…r-errors

Suggest swapping equality on E0277

Closes: rust-lang#132695 .
Handle asm const similar to inline const

Previously, asm consts are handled similar to anon consts rather than inline consts. Anon consts are not good at dealing with lifetimes, because `type_of` has lifetimes erased already. Inline consts can deal with lifetimes because they live in an outer typeck context. And since `global_asm!` lacks an outer typeck context, we have implemented asm consts with anon consts while they're in fact more similar to inline consts.

This was changed in rust-lang#137180, and this means that handling asm consts as inline consts are possible. While as `@compiler-errors` pointed out, `const` currently can't be used with any types with lifetime, this is about to change if rust-lang#128464 is implemented. This PR is a preparatory PR for that feature.

As an unintentional side effect, fix rust-lang#117877.

cc `@Amanieu`
r? `@compiler-errors`
Use `Binder<Vec<Ty>>` instead of `Vec<Binder<Ty>>` in both solvers for sized/auto traits/etc.

It's more conceptually justified IMO, especially when binders get implications.

r? lcnr
Use original command for showing sccache stats

I used the newer advanced command after bumping Linux sccache to 0.9. However, Windows and macOS still use older sccache, so the command didn't work for them (the error was masked on CI though). It sucks that we don't see the Windows/macOS sccache stats, so until we update both of them, just use the older flag with slightly less information.
…oss35

checked_ilog tests: deal with a bit of float imprecision

Fixes rust-lang#137591

r? `@tgross35`
…er-errors

Update E0133 docs for 2024 edition

The behavior of unsafe_op_in_unsafe_fn was changed in the 2024 edition. This updates this note in the E0133 docs to reflect that change.
…piler-errors

unconditionally lower match arm even if it's unneeded for never pattern in match

fixes rust-lang#137708

Lowering arm body is skipped when lowering match arm with never pattern, but we may need the HirId for DefId in the body in later passes. And then we got the ICE `No HirId for DefId`.

Fixes this by lowering the arm body even if it's unneeded for never pattern in match, so that we can generate HirId and use it then.

r? `@compiler-errors`
Tweak incorrect ABI suggestion and make suggestion verbose

Provide a better suggestion message, and make the suggestion verbose.

```
error[E0703]: invalid ABI: found `riscv-interrupt`
  --> $DIR/riscv-discoverability-guidance.rs:17:8
   |
LL | extern "riscv-interrupt" fn isr() {}
   |        ^^^^^^^^^^^^^^^^^ invalid ABI
   |
   = note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions
help: there's a similarly named valid ABI `riscv-interrupt-m`
   |
LL | extern "riscv-interrupt-m" fn isr() {}
   |                        ++
```
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Mar 1, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Mar 1, 2025

📌 Commit e5a639d 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 Mar 1, 2025
@bors
Copy link
Contributor

bors commented Mar 1, 2025

⌛ Testing commit e5a639d with merge 002da76...

@bors
Copy link
Contributor

bors commented Mar 1, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 002da76 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 1, 2025
@bors bors merged commit 002da76 into rust-lang:master Mar 1, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 1, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#137045 Defer repeat expr Copy checks to end of type checking eac9eda5b755f770ed9aa6d95ae9bc92f7d4516b (link)
#137171 Suggest swapping equality on E0277 75ba33e7c98fe2897e68f13cbafc983f7f008aa1 (link)
#137686 Handle asm const similar to inline const bcb9cb6c7e0e1520eb3762d76b6baf73fc3cbd4f (link)
#137689 Use Binder<Vec<Ty>> instead of Vec<Binder<Ty>> in both … 9d5f36922811940c3211d32620d96cbd18ce790d (link)
#137718 Use original command for showing sccache stats 3ee6de1ebbed36f1e091711d07407ac2498c2d64 (link)
#137730 checked_ilog tests: deal with a bit of float imprecision c5cbdbfe47c02483a65944073a81467da1fe91e8 (link)
#137735 Update E0133 docs for 2024 edition 468ac67cd8015f5c7f422bdf56c6ac1766515532 (link)
#137742 unconditionally lower match arm even if it's unneeded for n… 9b498870692eb13fcc8e75ad0383f8613384d0df (link)
#137771 Tweak incorrect ABI suggestion and make suggestion verbose 811f3ea2159b817a37e1044cebd37337f68589f5 (link)

previous master: 30508faeb3

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 (002da76): 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)

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

Cycles

Results (secondary -2.5%)

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)
-2.5% [-2.5%, -2.5%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 771.704s -> 772.769s (0.14%)
Artifact size: 361.99 MiB -> 361.98 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc 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-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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.