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

Consolidate WF for aliases #122341

Merged
merged 1 commit into from
Mar 15, 2024
Merged

Conversation

compiler-errors
Copy link
Member

Make RPITs/TAITs/weak (type) aliases/projections all enforce:

  1. their nominal predicates
  2. their args are WF

This possibly does extra work, but is also nice for consistency sake.

r? lcnr

@compiler-errors
Copy link
Member Author

@bors try

@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. labels Mar 11, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 11, 2024
Consolidate WF for aliases

Make RPITs/TAITs/weak (type) aliases/projections all enforce:
1. their nominal predicates
2. their args are WF

This possibly does extra work, but is also nice for consistency sake.

r? lcnr
@bors
Copy link
Contributor

bors commented Mar 11, 2024

⌛ Trying commit b16ff29 with merge eb761a9...

@compiler-errors
Copy link
Member Author

@rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 11, 2024
@bors
Copy link
Contributor

bors commented Mar 11, 2024

☀️ Try build successful - checks-actions
Build commit: eb761a9 (eb761a90cb473450ad47653f743c60864a1daebd)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (eb761a9): comparison URL.

Overall result: ❌ regressions - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.8% [0.6%, 4.9%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

Results

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.4% [-2.7%, -2.3%] 3
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 652.28s -> 651.369s (-0.14%)
Artifact size: 309.94 MiB -> 310.01 MiB (0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 11, 2024
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.

r=me

additional thought

compute_projection_args is just alias_ty.visit_with(with), but less performant as it emmits nested goals. Might be worth it to try and change it in this PR as well.

@compiler-errors
Copy link
Member Author

compute_projection_args is just alias_ty.visit_with(with), but less performant as it emmits nested goals. Might be worth it to try and change it in this PR as well.

It also filters args w/ escaping bound vars.

@compiler-errors
Copy link
Member Author

@bors r=lcnr rollup

@bors
Copy link
Contributor

bors commented Mar 14, 2024

📌 Commit 04524c8 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 Mar 14, 2024
@compiler-errors
Copy link
Member Author

actually why did i roll that up

@bors rollup=never

(useful for bisection i guess)

@lcnr
Copy link
Contributor

lcnr commented Mar 14, 2024

It also filters args w/ escaping bound vars.

yeah, so by eagerly recursing we filter slightly fewer types, e.g. we start emitting an error for for<'a> Alias<([str], &'a u32)>. However, this is desirable :>

@compiler-errors
Copy link
Member Author

I'd rather crater that in a separate PR, and perhaps also throw in other cases (e.g. trait refs) where this is being done in WF

@compiler-errors
Copy link
Member Author

#122501

@bors
Copy link
Contributor

bors commented Mar 15, 2024

⌛ Testing commit 04524c8 with merge 1ca424c...

@bors
Copy link
Contributor

bors commented Mar 15, 2024

☀️ Test successful - checks-actions
Approved by: lcnr
Pushing 1ca424c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 15, 2024
@bors bors merged commit 1ca424c into rust-lang:master Mar 15, 2024
12 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Mar 15, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1ca424c): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.0% [0.6%, 1.5%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

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)
2.3% [1.1%, 3.6%] 15
Regressions ❌
(secondary)
2.4% [0.5%, 3.7%] 56
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.3% [1.1%, 3.6%] 15

Cycles

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

Binary size

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

Bootstrap: 669.355s -> 669.777s (0.06%)
Artifact size: 311.47 MiB -> 311.40 MiB (-0.02%)

weihanglo pushed a commit to weihanglo/rust that referenced this pull request Mar 15, 2024
Consolidate WF for aliases

Make RPITs/TAITs/weak (type) aliases/projections all enforce:
1. their nominal predicates
2. their args are WF

This possibly does extra work, but is also nice for consistency sake.

r? lcnr
@compiler-errors compiler-errors deleted the alias-wfness branch March 20, 2024 18:31
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. 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.

5 participants