-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 dereferencing boolean reference when used in 'if' or 'while' #65150
Conversation
Change-Id: I0c5c4d767be2647e6f017ae7bf83558c56dbca97
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cramertj (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. |
r? @Aaron1011 |
This comment has been minimized.
This comment has been minimized.
Change-Id: I0c5c4d767be2647e6f017ae7bf83558c56dbca97
This comment has been minimized.
This comment has been minimized.
Change-Id: I0c5c4d767be2647e6f017ae7bf83558c56dbca97
r? @estebank |
| ^^^^^ | ||
| | | ||
| expected bool, found &bool | ||
| help: consider dereferencing the borrow: `*&true` |
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.
This tells me that suggest_ref_or_into
needs to check for literal borrows before suggesting, but that can be done in a subsequent PR.
@bors r+ |
📌 Commit bbb69d1 has been approved by |
@XiangQingW: Note that I'm not a member of the Rust team, so requesting me as a reviewer won't be very useful 😄 |
Suggest dereferencing boolean reference when used in 'if' or 'while' Implements rust-lang#64557
Suggest dereferencing boolean reference when used in 'if' or 'while' Implements rust-lang#64557
Rollup of 8 pull requests Successful merges: - #64726 (rewrite documentation for unimplemented! to clarify use) - #65040 (syntax: more cleanups in item and function signature parsing) - #65046 (Make `Cell::new` method come first in documentation) - #65098 (Add long error explanation for E0561) - #65150 (Suggest dereferencing boolean reference when used in 'if' or 'while') - #65154 (Fix const generic arguments not displaying in types mismatch diagnostic) - #65181 (fix bug in folding for constants) - #65187 (use 'invalid argument' for vxWorks) Failed merges: - #65179 (Add long error explanation for E0567) r? @ghost
☔ The latest upstream changes (presumably #65196) made this pull request unmergeable. Please resolve the merge conflicts. |
Implements #64557