-
Notifications
You must be signed in to change notification settings - Fork 14k
emit ConstEquate in TypeRelating<D>
#107434
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
|
r? @lcnr (rustbot has picked a reviewer for you, use r? to override) |
|
r? compiler-contributors |
892f120 to
f2c24af
Compare
|
r? @compiler-errors @bors r+ yeet |
|
📌 Commit f2c24afe0fd510f8c592e737a5c06a42c6109ca1 has been approved by It is now in the queue for this repository. |
|
⌛ Testing commit f2c24afe0fd510f8c592e737a5c06a42c6109ca1 with merge 90c1e6c689773c8d55031328f01ca276da9d157d... |
|
💔 Test failed - checks-actions |
|
@bors retry spurious |
|
⌛ Testing commit f2c24afe0fd510f8c592e737a5c06a42c6109ca1 with merge c907399ed72f3a206817be8ac1085d06741f7c78... |
|
💔 Test failed - checks-actions |
|
@bors retry |
|
💡 This pull request was already approved, no need to approve it again.
|
|
📌 Commit f2c24afe0fd510f8c592e737a5c06a42c6109ca1 has been approved by It is now in the queue for this repository. |
|
@bors retry |
|
⌛ Testing commit f2c24afe0fd510f8c592e737a5c06a42c6109ca1 with merge 6ebe0f75c272d590ed38cbb30d1cde018f65c95b... |
|
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
f2c24af to
d85d906
Compare
|
@bors r=compiler-errors maybe rebasing will fix everything magically |
This comment has been minimized.
This comment has been minimized.
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (2a6ff72): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
|
This comment has been minimized.
This comment has been minimized.
|
This introduces an ICE. See #107898 |
emitting
ConstEquateduring mir typeck is useful since it can help catch bugs in hir typeck incase our impl ofConstEquateis wrong.doing this did actually catch a bug, when relating
Expr::Callwe==the types of all the argument consts which spuriously returns false if the type contains const projections/aliases which causes us to fall through to theexpected_founderror arm.Generally its an ICE if the
Const'sTys arent equal butConstKind::Expris kind of special since they are sort of like const items that areconst CALL<F: const Fn(...), const N: F>though we dont actually explicitly represent theFtype param explicitly inExpr::Callso I just made us relate theConst's ty field to avoid getting ICEs from the tests I added and the following existing test:which has us relate two
ConstKind::Valueone for the fn item ofsize_of::<Foo<T>>and one for the fn item ofsize_of::<T>(), these only differ by theirTyand if we don't relate theTywe'll end up getting an ICE from the checks that ensure thetyfields always match.In theory
Expr::UnOphas the same problem so I added a call torelatefor the ty's, although I was unable to create a repro test.