Skip to content

Suggest removing a semicolon and boxing the expressions for if-else #99974

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Conversation

TaKO8Ki
Copy link
Member

@TaKO8Ki TaKO8Ki commented Jul 31, 2022

InferCtxt::suggest_remove_semi_or_return_binding was not working well for if-else, so I fixed it and added a ui test.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 31, 2022
@rust-highfive
Copy link
Contributor

r? @estebank

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 31, 2022
@compiler-errors
Copy link
Member

r? @compiler-errors
this was my bug, sorry about that.

@bors r+ rolluo

@bors
Copy link
Collaborator

bors commented Jul 31, 2022

📌 Commit f6908be has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 31, 2022
@compiler-errors
Copy link
Member

@bors rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 31, 2022
Rollup of 5 pull requests

Successful merges:

 - rust-lang#99186 (Use LocalDefId for closures more)
 - rust-lang#99741 (Use `impl`'s generics when suggesting fix on bad `impl Copy`)
 - rust-lang#99844 (Introduce an ArchiveBuilderBuilder)
 - rust-lang#99921 (triagebot.yml: CC Enselic when rustdoc-json-types changes)
 - rust-lang#99974 (Suggest removing a semicolon and boxing the expressions for if-else)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 990bce4 into rust-lang:master Jul 31, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 31, 2022
@TaKO8Ki TaKO8Ki deleted the suggest-removing-semicolon-and-boxing-the-expressions branch July 31, 2022 16:45
@@ -0,0 +1,70 @@
// edition:2018
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file can be // run-rustfix, right?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants