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 7 pull requests #135213

Closed
wants to merge 20 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

beepster4096 and others added 20 commits October 1, 2024 23:41
This accomplishes something like 16a4ad7,
but with the `rustc_allowed_through_unstable_modules` attribute instead
of the path length.
…leywiser

Stop clearing box's drop flags early

Ever since rust-lang#100036, drop flags have been incorrectly cleared when destructors are called. This only does anything in a very specific case involving Box, leading to the fields of the Box not being dropped when they should. This PR fixes that.

Fixes rust-lang#131082
…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=5

@bors
Copy link
Contributor

bors commented Jan 7, 2025

📌 Commit bd9744d 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
Contributor

bors commented Jan 7, 2025

⌛ Testing commit bd9744d with merge 50ab4b9...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 7, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#131146 (Stop clearing box's drop flags early)
 - rust-lang#133810 (remove unnecessary `eval_verify_bound`)
 - rust-lang#134745 (Normalize each signature input/output in `typeck_with_fallback` with its own span)
 - rust-lang#134989 (Lower Guard Patterns to HIR.)
 - rust-lang#135149 (Use a post-monomorphization typing env when mangling components that come from impls)
 - rust-lang#135171 (rustdoc: use stable paths as preferred canonical paths)
 - rust-lang#135200 (rustfmt: drop nightly-gating of the `--style-edition` flag registration)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job test-various failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [mir-opt] tests/mir-opt/box_conditional_drop_allocator.rs stdout ----
72   
73       bb6: {
74           StorageDead(_4);
- -         drop(_1) -> [return: bb7, unwind continue];
+ -         drop(_1) -> [return: bb7, unwind: bb13];
76 +         goto -> bb22;
78   


thread '[mir-opt] tests/mir-opt/box_conditional_drop_allocator.rs' panicked at src/tools/compiletest/src/runtest/mir_opt.rs:93:21:

@bors
Copy link
Contributor

bors commented Jan 7, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 7, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Jan 7, 2025

#131146

@jieyouxu jieyouxu closed this Jan 7, 2025
@matthiaskrgr matthiaskrgr deleted the rollup-jgjnmel branch January 25, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants