-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Suggest adding a where-clause when that can help #32583
Conversation
☔ The latest upstream changes (presumably #32439) made this pull request unmergeable. Please resolve the merge conflicts. |
317e7e6
to
331e612
Compare
let custom_note = report_on_unimplemented(infcx, &trait_ref.0, | ||
obligation.cause.span); | ||
if let Some(s) = custom_note { | ||
"the predicate `{}` is not satisfied", |
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, I wonder if it is better to write in this uniform style, or to try to have a custom error message? Not clear to me. It seems likely that if we are going to make this message generic, we could combine with some other error-code -- though maybe there is value in separating out this form of predicate from the others. NM, keep it with its own code.
Everything looks good, I'd like to review the comments though, just because I'd like to ensure this is well documented for future reference (and to make sure we are on same page) |
Yes, I know, I was suggesting changing it to remove the space. |
now that normalize_to_error no longer creates these, it is unnecessary.
suggest adding a where-clause when there is an unmet trait-bound that can be satisfied if some type can implement it.
the meaning of these tests had changed completely over the years and now they are only a maintenance burden.
@bors r+ |
📌 Commit 832b707 has been approved by |
⌛ Testing commit 832b707 with merge c7a6876... |
💔 Test failed - auto-linux-64-opt |
@bors r=nikomatsakis |
📌 Commit 32fc7c3 has been approved by |
@bors r=nikomatsakis |
📌 Commit 30d8eff has been approved by |
Suggest adding a where-clause when that can help Suggest adding a where-clause when there is an unmet trait-bound that can be satisfied if some type can implement it. r? @nikomatsakis
⌛ Testing commit 30d8eff with merge a66f46e... |
💔 Test failed - auto-linux-64-nopt-t |
@bors r=nikomatsakis |
📌 Commit 0ac5e48 has been approved by |
Suggest adding a where-clause when that can help Suggest adding a where-clause when there is an unmet trait-bound that can be satisfied if some type can implement it. r? @nikomatsakis
Suggest adding a where-clause when there is an unmet trait-bound that can be satisfied if some type can implement it.
r? @nikomatsakis