-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: Diagnose some incorrect usages of the question mark operator #13354
Conversation
match self.resolve_try_impl_for(inner_ty.clone()) { | ||
Some((_, Some((output, residual)))) => { | ||
if let Some((_trait, false)) = | ||
self.implements_from_residual(self.return_ty.clone(), residual) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it might not be possible to solve this uniquely at this point, which means we'll miss some cases here -- the proper place to emit these diagnostics would be in resolve_obligations_as_possible
, which of course means we have to track where the obligations come from
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, ye I see what you mean. The way this is done shouldn't cause wrong diagnostics though if I see this right, only miss some?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
☔ The latest upstream changes (presumably #13329) made this pull request unmergeable. Please resolve the merge conflicts. |
3e8b6ff
to
16cf939
Compare
@bors r+ |
☀️ Test successful - checks-actions |
try-diagnostics.mp4 |
Revert "feat: Diagnose some incorrect usages of the question mark operator" Reverts #13354 It seems like we are getting stuck with inference variables here, not just placeholders and errors so there is probably more wrong here that I don't understand. Reverting seems like the best solution right now as I don't have the time to look into this this week.
Trying to figure out how the type stuff in r-a works some more, I think I am doing this correct here but I am not quite sure :)