feat: Diagnose some incorrect usages of the question mark operator#13354
Merged
bors merged 1 commit intorust-lang:masterfrom Oct 16, 2022
Merged
feat: Diagnose some incorrect usages of the question mark operator#13354bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
flodiebold
reviewed
Oct 5, 2022
| 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) |
Member
There was a problem hiding this comment.
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
Member
Author
There was a problem hiding this comment.
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?
Contributor
|
☔ The latest upstream changes (presumably #13329) made this pull request unmergeable. Please resolve the merge conflicts. |
3e8b6ff to
16cf939
Compare
Member
Author
|
@bors r+ |
Contributor
Contributor
Contributor
|
☀️ Test successful - checks-actions |
Member
try-diagnostics.mp4 |
bors
added a commit
that referenced
this pull request
Oct 18, 2022
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.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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 :)