-
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
Improve the "try using a variant of the expected type" hint. #65562
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @estebank (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
I'm happy with most of it, r=me on those grounds once CI is green. The case I highlighted is correct code, but I liked the readability of the previous version a bit better. It is just a matter of style so it probably doesn't matter. |
Moving the PR description to this comment, as it otherwise will end up in the merge commit:
|
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Hi, Thanks for the ping - I was actually waiting for response from @estebank or @Centril (the I fixed the tests for now, but left the behaviour unchanged - please let me know if that's okay :-) |
☔ The latest upstream changes (presumably #65845) made this pull request unmergeable. Please resolve the merge conflicts. |
You will have to rebase against latest master :) |
Yay! |
@bors r+ |
📌 Commit 1c5d0be has been approved by |
Improve the "try using a variant of the expected type" hint. Fix rust-lang#65494. - Change type-printing output. - Use `span_to_snippet` when possible. - Change the message to `try using a variant of the expected enum`
☔ The latest upstream changes (presumably #65421) made this pull request unmergeable. Please resolve the merge conflicts. |
Hi, I've rebased the changes. |
@bors r+ |
📌 Commit 5c023d6 has been approved by |
Improve the "try using a variant of the expected type" hint. Fix rust-lang#65494. - Change type-printing output. - Use `span_to_snippet` when possible. - Change the message to `try using a variant of the expected enum`
Improve the "try using a variant of the expected type" hint. Fix rust-lang#65494. - Change type-printing output. - Use `span_to_snippet` when possible. - Change the message to `try using a variant of the expected enum`
Improve the "try using a variant of the expected type" hint. Fix rust-lang#65494. - Change type-printing output. - Use `span_to_snippet` when possible. - Change the message to `try using a variant of the expected enum`
Rollup of 5 pull requests Successful merges: - #65294 (Lint ignored `#[inline]` on function prototypes) - #65318 (Call out the types that are non local on E0117) - #65531 (Update backtrace to 0.3.40) - #65562 (Improve the "try using a variant of the expected type" hint.) - #65809 (Add new EFIAPI ABI) Failed merges: r? @ghost
☔ The latest upstream changes (presumably #65919) made this pull request unmergeable. Please resolve the merge conflicts. |
Fix #65494.
span_to_snippet
when possible.try using a variant of the expected enum