Skip to content

Conversation

BoxyUwU
Copy link
Member

@BoxyUwU BoxyUwU commented Oct 10, 2025

Fixes #147529

r? lcnr

see test comment

@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. beta-nominated Nominated for backporting to the compiler in the beta channel. labels Oct 10, 2025
@rust-log-analyzer

This comment has been minimized.

@BoxyUwU BoxyUwU force-pushed the opaque_types_placeholder_outlives branch from fd26c38 to 7ad74c0 Compare October 10, 2025 19:09
@rust-log-analyzer

This comment has been minimized.

@BoxyUwU BoxyUwU force-pushed the opaque_types_placeholder_outlives branch from 7ad74c0 to aea3cae Compare October 10, 2025 19:21
@rust-log-analyzer

This comment has been minimized.

@lcnr
Copy link
Contributor

lcnr commented Oct 13, 2025

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 13, 2025
…<try>

rewrite outlives placeholder constraints to outlives static when handling opaque types
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 13, 2025
) -> RegionCtxt<'a, 'tcx> {
let mut outlives_constraints = constraints.outlives_constraints.clone();
let universal_regions = &universal_region_relations.universal_regions;
let (definitions, _has_placeholders) = region_definitions(infcx, universal_regions);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

u're ignoring _has_placeholders?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

figured if perf was OK there'd be no point in complicating the flow of the logic with a perf opt based on whether there were placeholders or not

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some small nits, r=me on the change

please also add a test to the same file which uses a for<'a> T: 'a where bound instead of the for<'a> T: Outlives<'a>.

That didn't regress but feels like the same pattern 😁

View changes since this review

@rust-bors
Copy link

rust-bors bot commented Oct 13, 2025

☀️ Try build successful (CI)
Build commit: 53d5e63 (53d5e639745f490c8f6ff3e162f43422163e408b, parent: 36e4f5d1fe1d63953a5bf1758ce2b64172623e2e)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (53d5e63): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -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.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

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

Binary size

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

Bootstrap: 473.739s -> 473.454s (-0.06%)
Artifact size: 388.11 MiB -> 388.12 MiB (0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 13, 2025
@BoxyUwU BoxyUwU force-pushed the opaque_types_placeholder_outlives branch 4 times, most recently from c25dd85 to e16f472 Compare October 13, 2025 14:12
@rust-log-analyzer

This comment has been minimized.

@BoxyUwU BoxyUwU force-pushed the opaque_types_placeholder_outlives branch from e16f472 to 30bedc7 Compare October 13, 2025 14:26
@lcnr
Copy link
Contributor

lcnr commented Oct 13, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 13, 2025

📌 Commit 30bedc7 has been approved by lcnr

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 Oct 13, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 13, 2025
…utlives, r=lcnr

rewrite outlives placeholder constraints to outlives static when handling opaque types

Fixes rust-lang#147529

r? lcnr

see test comment
bors added a commit that referenced this pull request Oct 13, 2025
Rollup of 7 pull requests

Successful merges:

 - #144266 (Supress swapping lhs and rhs in equality suggestion in extern macro )
 - #147471 (Assert that non-extended temporaries and `super let` bindings have scopes)
 - #147533 (Renumber return local after state transform)
 - #147566 (rewrite outlives placeholder constraints to outlives static when handling opaque types)
 - #147613 (Make logging filters work again by moving EnvFilter into its own layer)
 - #147615 (reduce calls to attr.span() in old doc attr parsing)
 - #147636 (miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7d0a0a3 into rust-lang:master Oct 13, 2025
10 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 13, 2025
rust-timer added a commit that referenced this pull request Oct 13, 2025
Rollup merge of #147566 - BoxyUwU:opaque_types_placeholder_outlives, r=lcnr

rewrite outlives placeholder constraints to outlives static when handling opaque types

Fixes #147529

r? lcnr

see test comment
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Oct 15, 2025
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#144266 (Supress swapping lhs and rhs in equality suggestion in extern macro )
 - rust-lang/rust#147471 (Assert that non-extended temporaries and `super let` bindings have scopes)
 - rust-lang/rust#147533 (Renumber return local after state transform)
 - rust-lang/rust#147566 (rewrite outlives placeholder constraints to outlives static when handling opaque types)
 - rust-lang/rust#147613 (Make logging filters work again by moving EnvFilter into its own layer)
 - rust-lang/rust#147615 (reduce calls to attr.span() in old doc attr parsing)
 - rust-lang/rust#147636 (miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
@apiraino
Copy link
Contributor

Beta backport approved as per compiler team on Zulip. A backport PR will be authored by the release team at the end of the current development cycle. Backport labels handled by them.

@rustbot label +beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Oct 16, 2025
@cuviper cuviper mentioned this pull request Oct 16, 2025
@cuviper cuviper modified the milestones: 1.92.0, 1.91.0 Oct 16, 2025
@cuviper cuviper removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 16, 2025
bors added a commit that referenced this pull request Oct 17, 2025
[beta] backports

- Change int-to-ptr transmute lowering back to inttoptr #147541
- rewrite outlives placeholder constraints to outlives static when handling opaque types #147566
- GVN: Invalidate derefs at loop headers #147607

r? cuviper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-accepted Accepted for backporting to the compiler in the beta channel. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hidden type for impl ... captures lifetime that does not appear in bounds

8 participants