Skip to content

Don't ICE on placeholder consts in deep reject #109740

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

Conversation

compiler-errors
Copy link
Member

Since we canonicalize const params into placeholder consts, we need to be able to handle them during deep reject.

r? @lcnr (though maybe @oli-obk can look at this one too, if he wants 😸)

Fixes compiler-errors/next-solver-hir-issues#10

@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 29, 2023
@@ -312,6 +312,7 @@ impl DeepRejectCtxt {
// Impls cannot contain these types as these cannot be named directly.
ty::FnDef(..) | ty::Closure(..) | ty::Generator(..) => false,

// Placeholder types don't unify with anything on their own
ty::Placeholder(..) | ty::Bound(..) => false,
Copy link
Contributor

Choose a reason for hiding this comment

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

weird that we allow ty::Bound but not ConstKind::Bound 🤷 both should be unreachable (or well, reachable with ty/const binders)

@lcnr
Copy link
Contributor

lcnr commented Mar 30, 2023

iirc this code is stupidly hot, so even if trivial, a bit worried this changes perf

@bors try @rust-timer queue

r=me afterwards

@rust-timer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Mar 30, 2023

⌛ Trying commit 1ce6e2b with merge d439f8967e8c9de02557632b30e15cca99fdb8c5...

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

bors commented Mar 30, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d439f8967e8c9de02557632b30e15cca99fdb8c5): comparison URL.

Overall result: ✅ improvements - 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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.2%] 2
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)
- - 0
Regressions ❌
(secondary)
2.9% [2.4%, 3.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.1% [-2.1%, -2.1%] 1

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 30, 2023
@lcnr
Copy link
Contributor

lcnr commented Mar 30, 2023

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 30, 2023

📌 Commit 1ce6e2b 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 30, 2023
@bors
Copy link
Collaborator

bors commented Mar 30, 2023

⌛ Testing commit 1ce6e2b with merge ec2f40c...

@bors
Copy link
Collaborator

bors commented Mar 30, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 30, 2023
@bors bors merged commit ec2f40c into rust-lang:master Mar 30, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 30, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ec2f40c): 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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.5% [-1.5%, -1.5%] 1
All ❌✅ (primary) - - 0

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)
2.8% [2.8%, 2.8%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.8% [2.8%, 2.8%] 1

@compiler-errors compiler-errors deleted the new-solver-deep-reject-placeholder-consts branch August 11, 2023 20:08
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.

ICE: Placeholder const in deep rejection
5 participants