Skip to content

Yeet QueryTypeRelatingDelegate, move NllTypeRelating into borrowck crate - #121321

Merged
bors merged 3 commits into
rust-lang:masterfrom
compiler-errors:yeet-querytyperelating
Feb 21, 2024
Merged

bors merged 3 commits into
rust-lang:masterfrom
compiler-errors:yeet-querytyperelating

Conversation

@compiler-errors

Copy link
Copy Markdown
Contributor

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

rustbot commented Feb 20, 2024

Copy link
Copy Markdown
Collaborator

Type relation code was changed

cc @compiler-errors, @lcnr

}

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

@lcnr lcnr Feb 20, 2024 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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

@rust-cloud-vms
rust-cloud-vms Bot force-pushed the yeet-querytyperelating branch from 45c5586 to 9b1f9ed Compare February 20, 2024 17:45

@lcnr lcnr left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread compiler/rustc_borrowck/src/type_check/relate_tys.rs Outdated
Comment thread compiler/rustc_borrowck/src/type_check/relate_tys.rs Outdated
@lcnr

lcnr commented Feb 20, 2024

Copy link
Copy Markdown
Contributor

@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

bors commented Feb 20, 2024

Copy link
Copy Markdown
Collaborator

⌛ 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

bors commented Feb 20, 2024

Copy link
Copy Markdown
Collaborator

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

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
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
@rust-cloud-vms
rust-cloud-vms Bot force-pushed the yeet-querytyperelating branch from 9b1f9ed to 2415d43 Compare February 21, 2024 18:12
@rust-cloud-vms
rust-cloud-vms Bot force-pushed the yeet-querytyperelating branch from 2415d43 to 64d6303 Compare February 21, 2024 18:37
@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
Copy Markdown
Contributor 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
Copy Markdown
Contributor Author

@bors r=lcnr

@bors

bors commented Feb 21, 2024

Copy link
Copy Markdown
Collaborator

📌 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

bors commented Feb 21, 2024

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 64d6303 with merge d7bd9cd...

@bors

bors commented Feb 21, 2024

Copy link
Copy Markdown
Collaborator

☀️ 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
@rustbot rustbot added this to the 1.78.0 milestone Feb 21, 2024
@rust-timer

Copy link
Copy Markdown
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