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

Yeet QueryTypeRelatingDelegate, move NllTypeRelating into borrowck crate #121321

Merged
merged 3 commits into from
Feb 21, 2024

Conversation

compiler-errors
Copy link
Member

We can just use the existing equate relation for query instantiation. I don't expect us to want to move everything into TypeRelating.

r? lcnr

@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 Feb 20, 2024
@rustbot
Copy link
Collaborator

rustbot commented Feb 20, 2024

Type relation code was changed

cc @compiler-errors, @lcnr

@@ -84,7 +84,7 @@ impl<'me, 'bccx, 'tcx> NllTypeRelatingDelegate<'me, 'bccx, 'tcx> {
}
}

impl<'tcx> TypeRelatingDelegate<'tcx> for NllTypeRelatingDelegate<'_, '_, 'tcx> {
impl<'tcx> NllTypeRelatingDelegate<'tcx> for NllNllTypeRelatingDelegate<'_, '_, 'tcx> {
Copy link
Contributor

@lcnr lcnr Feb 20, 2024

Choose a reason for hiding this comment

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

this is now the only NllTypeRelatingDelegate in existance, just stop using a delegate and inline this into the relation? That does require moving the whole relation to rustc_borrowck which... does that cause some privacy issues?

Also... NllNllTypeRelatingDelegate looks horrible 😅 maybe just name the struct `TypeRelatingDelegate' or sth, given that it's in borrowck so clearly for nll

i am in generally in favor of this change

Copy link
Member Author

Choose a reason for hiding this comment

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

NllNll was a typo, lol

I just inlined the whole thing into borrowck

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.

two existing nits, then r=me

compiler/rustc_borrowck/src/type_check/relate_tys.rs Outdated Show resolved Hide resolved
compiler/rustc_borrowck/src/type_check/relate_tys.rs Outdated Show resolved Hide resolved
@lcnr
Copy link
Contributor

lcnr commented Feb 20, 2024

@bors try @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 Feb 20, 2024
@bors
Copy link
Contributor

bors commented Feb 20, 2024

⌛ Trying commit 9b1f9ed with merge 381aeee...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 20, 2024
…ng, r=<try>

Yeet `QueryTypeRelatingDelegate`

We can just use the existing equate relation for query instantiation. I don't expect us to want to move everything into `TypeRelating`.

r? lcnr
@bors
Copy link
Contributor

bors commented Feb 20, 2024

☀️ Try build successful - checks-actions
Build commit: 381aeee (381aeee489f72dbb498f2054c43ac9780b9d7829)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (381aeee): comparison URL.

Overall result: no relevant changes - 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 benchmark run did not return any relevant results for this metric.

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)
1.8% [1.8%, 1.8%] 1
Regressions ❌
(secondary)
3.3% [2.6%, 4.3%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.8% [1.8%, 1.8%] 1

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: 641.255s -> 640.328s (-0.14%)
Artifact size: 308.58 MiB -> 308.55 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 20, 2024
@compiler-errors compiler-errors changed the title Yeet QueryTypeRelatingDelegate Yeet QueryTypeRelatingDelegate, move NllTypeRelating into borrowck crate Feb 21, 2024
.dcx()
.span_bug(self.delegate.span(), format!("unexpected inference var {b:?}"));
}
// FIXME(invariance): see the related FIXME above.
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't believe this FIXME makes sense anymore, so I removed it.

@compiler-errors
Copy link
Member Author

@bors r=lcnr

@bors
Copy link
Contributor

bors commented Feb 21, 2024

📌 Commit 64d6303 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 Feb 21, 2024
@bors
Copy link
Contributor

bors commented Feb 21, 2024

⌛ Testing commit 64d6303 with merge d7bd9cd...

@bors
Copy link
Contributor

bors commented Feb 21, 2024

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

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

Finished benchmarking commit (d7bd9cd): 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

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)
4.4% [4.4%, 4.4%] 1
Regressions ❌
(secondary)
3.7% [3.7%, 3.7%] 1
Improvements ✅
(primary)
-3.0% [-4.0%, -2.1%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.5% [-4.0%, 4.4%] 3

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: 649.979s -> 649.698s (-0.04%)
Artifact size: 311.00 MiB -> 310.95 MiB (-0.02%)

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