Skip to content

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

lcnr and others added 17 commits December 4, 2024 16:39
This accomplishes something like 16a4ad7,
but with the `rustc_allowed_through_unstable_modules` attribute instead
of the path length.
…er-errors

remove unnecessary `eval_verify_bound`

This does not impact any tests. I feel like any cases where this could useful should instead be fixed by a general improvement to `eval_verify_bound` to avoid having to promote this `TypeTest` in the first place 🤔

r? types cc ``@nikomatsakis``
…-typeck, r=BoxyUwU

Normalize each signature input/output in `typeck_with_fallback` with its own span

Applies the same hack as rust-lang#106582 but to the args in typeck. Greatly improves normalization error spans from a signature.
…r=oli-obk

Lower Guard Patterns to HIR.

Implements lowering of [guard patterns](https://rust-lang.github.io/rfcs/3637-guard-patterns.html) (see the [tracking issue](rust-lang#129967)) to HIR.
Use a post-monomorphization typing env when mangling components that come from impls

When mangling associated methods of impls, we were previously using the wrong param-env. Instead of using a fully monomorphized param-env like we usually do in codegen, we were taking the post-analysis param-env, and treating it as an early binder to *re-substitute* the impl args. I've pointed out the problematic old code in an inline comment.

This would give us param-envs with possibly trivial predicates that would prevent normalization via param-env shadowing.

In the example test linked below, `tests/ui/symbol-names/normalize-in-param-env.rs`, this happens when we mangle the impl `impl<P: Point2> MyFrom<P::S> for P` with the substitution `P = Vec2`. Because the where clause of the impl is `P: Point2`, which elaborates to `[P: Point2, P: Point, <P as Point>::S projects-to <P as Point2>::S2]` and the fact that `impl Point2 for Vec2` normalizes `Vec2::S2` to `Vec2::S`, this causes a cycle.

The proper fix here is to use a fully monomorphized param-env for the case where the impl is properly substituted.

Fixes rust-lang#135143

While rust-lang#134081 uncovered this bug for legacy symbol mangling, it was preexisting for v0 symbol mangling. This PR fixes both. The test requires a "hack" because we strip the args of the instance we're printing for legacy symbol mangling except for drop glue, so we box a closure to ensure we generate drop glue.

r? oli-obk
…-better, r=GuillaumeGomez

rustdoc: use stable paths as preferred canonical paths

This accomplishes something like 16a4ad7, but with the `rustc_allowed_through_unstable_modules` attribute instead of the path length.

Fixes rust-lang#131676
…r=ytmimi,compiler-errors

rustfmt: drop nightly-gating of the `--style-edition` flag registration

Follow-up to [Stabilize `style_edition = "2024"` in-tree rust-lang#134929](rust-lang#134929).

rust-lang#134929 un-nightly-gated the *read* of `--style-edition`, but didn't also un-nightly-gate the *registration*/*declaration* of the `--style-edition` flag itself. Reading `--style-edition` on a non-nightly channel (e.g. beta) will thus panic because `--style-edition` is never declared.

This PR also un-nightly-gates the registration. Not sure how to write a regression test for this, because this *requires* the non-nightly / beta channel. Though existing tests do fail (albeit indirectly).

Checking if this fixes the panic against beta in rust-lang#135197.

r? rustfmt
@rustbot rustbot added 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jan 7, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=6

@bors
Copy link
Collaborator

bors commented Jan 7, 2025

📌 Commit 5dd21df 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 Jan 7, 2025
@bors
Copy link
Collaborator

bors commented Jan 7, 2025

⌛ Testing commit 5dd21df with merge 0707499...

@bors
Copy link
Collaborator

bors commented Jan 8, 2025

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 8, 2025
@bors bors merged commit 0707499 into rust-lang:master Jan 8, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 8, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#133810 remove unnecessary eval_verify_bound 14e7dc75cdd78b3a03609258e824e9fd6faf5893 (link)
#134745 Normalize each signature input/output in `typeck_with_fallb… 0fea74788685195da7ab03f1f6da81e8ce327686 (link)
#134989 Lower Guard Patterns to HIR. e829f030d93a698ab776fa8518f1345bbbedf5f6 (link)
#135149 Use a post-monomorphization typing env when mangling compon… fe0f6fef3cbf88eca7603c7203afef07f539c471 (link)
#135171 rustdoc: use stable paths as preferred canonical paths 71c18b26abea7781b0641b84551712c5971d0a19 (link)
#135200 rustfmt: drop nightly-gating of the --style-edition flag … a3816cd63c64db61f4765d0cfb24d58feb3a7c29 (link)

previous master: ad211ced81

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 (0707499): 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 (primary 3.3%, secondary 0.8%)

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)
3.3% [3.1%, 3.5%] 2
Regressions ❌
(secondary)
0.8% [0.8%, 0.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.3% [3.1%, 3.5%] 2

Cycles

Results (primary -2.2%, secondary -3.2%)

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)
-2.2% [-2.9%, -1.6%] 2
Improvements ✅
(secondary)
-3.2% [-5.1%, -1.6%] 10
All ❌✅ (primary) -2.2% [-2.9%, -1.6%] 2

Binary size

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

Bootstrap: 763.589s -> 763.245s (-0.05%)
Artifact size: 325.74 MiB -> 325.72 MiB (-0.00%)

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. T-compiler Relevant to the compiler 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.

9 participants