Skip to content

deduplicate infer var instantiation #121211

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 5 commits into from
Feb 20, 2024
Merged

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Feb 17, 2024

Having 3 separate implementations of one of the most subtle parts of our type system is not a good strategy if we want to maintain a sound type system ✨ while working on this I already found some subtle bugs in the existing code, so that's awesome 🎉 cc #121159

This was necessary as I am not confident in my nll changes in #119106, so I am first cleaning this up in a separate PR.

r? @BoxyUwU

lcnr added 4 commits February 17, 2024 00:25
we already use `instantiate_const_var`. This does lose some debugging
info for nll because we stop populating the `reg_var_to_origin` table with
`RegionCtxt::Existential(None)`, I don't think that matters however.
Supporting this adds additional complexity to one of the most involved
parts of the type system, so I really don't think it's worth it.
@lcnr
Copy link
Contributor Author

lcnr commented Feb 17, 2024

@bors try @rust-timer queue

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

rustbot commented Feb 17, 2024

Type relation code was changed

cc @compiler-errors, @lcnr

@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 17, 2024
@bors
Copy link
Collaborator

bors commented Feb 17, 2024

⌛ Trying commit fea82c9 with merge 06e5b65...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 17, 2024
deduplicate infer var instantiation

Having 3 separate implementations of one of the most subtle parts of our type system is not a good strategy if we want to maintain a sound type system ✨ while working on this I already found some subtle bugs in the existing code, so that's awesome 🎉

This was necessary as I am not confident in my nll changes in rust-lang#119106, so I am first cleaning this up in a separate PR.

r? `@BoxyUwU`
@rust-log-analyzer

This comment has been minimized.

@lcnr lcnr force-pushed the nll-relate-handle-infer branch from fea82c9 to 54b3c87 Compare February 17, 2024 01:56
@BoxyUwU
Copy link
Member

BoxyUwU commented Feb 19, 2024

@bors r+ rollup=never

@bors
Copy link
Collaborator

bors commented Feb 19, 2024

📌 Commit 54b3c87 has been approved by BoxyUwU

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 19, 2024
@bors
Copy link
Collaborator

bors commented Feb 19, 2024

⌛ Testing commit 54b3c87 with merge 0395fa3...

@bors
Copy link
Collaborator

bors commented Feb 20, 2024

☀️ Test successful - checks-actions
Approved by: BoxyUwU
Pushing 0395fa3 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 20, 2024
@bors bors merged commit 0395fa3 into rust-lang:master Feb 20, 2024
@rustbot rustbot added this to the 1.78.0 milestone Feb 20, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0395fa3): 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)
- - 0
Regressions ❌
(secondary)
3.9% [3.9%, 3.9%] 1
Improvements ✅
(primary)
-2.8% [-2.8%, -2.8%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.8% [-2.8%, -2.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: 639.676s -> 639.836s (0.03%)
Artifact size: 308.81 MiB -> 308.66 MiB (-0.05%)

# for free to join this conversation on GitHub. Already have an account? # 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. S-waiting-on-perf Status: Waiting on a perf run to be completed. 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.

6 participants