You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(rustbot has picked a reviewer for you, use r? to override)
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 13, 2023
After #107940 lands, this these functions should additionally use TyCtxt::check_tys_might_be_eq when the new solver is enabled, to check for deep type equality with lazy norm... but I'll leave that up to another PR.
I feel like if !self.infcx.can_eq(a, b) { is less clear than if self.infcx.can_eq(a, b).is_err(). Could we just make the return type Result<(), ()>. if we start handling nested obligations we wont be able to always return a TypeError anyway so getting rid of it would have to happen
Ignoring for a moment that can_eq is kinda bad as a whole because it ignores nested obligations causing stuff like lazy norm to end up changing behavior I am in favor of this change.
Definitely in favor of yeeting TypeError from can_eq because I can't think of a case where you should use that TypeError to actually do anything 😅
wrt TyCtxt::check_tys_might_be_eq and lazy norm I don't yet have an opinion. I slightly prefer returning bool over result here.
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 15, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
5 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nobody matches on the result, nor does the result return anything useful...