-
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' #64557
Comments
@rustbot modify labels to +A-lint |
@rustbot modify labels to -A-lint +A-suggestion-diagnostics |
@Aaron1011 I'd love to be assigned to the issue. |
@XiangQingW: You can use |
Error: Parsing assign command in comment failed: ... assign me|error: user should start with @ at >|... Please let |
1 similar comment
Error: Parsing assign command in comment failed: ... assign me|error: user should start with @ at >|... Please let |
@rustbot claim |
Has a PR been submitted for this yet? I'm happy to take it if not |
|
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
Fixed in #65150 |
The following code:
gives the following errors:
Note that the first error is missing the "help: consider dereferencing the borrow:
*a
" suggestion.For consistency, Rust should suggest dereferencing a boolean reference when used in an 'if' expression.
This issue has been assigned to @XiangQingW via this comment.
The text was updated successfully, but these errors were encountered: