Skip to content
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

Do not suggest adding a semicolon after ? #87061

Merged
merged 1 commit into from
Jul 11, 2021

Conversation

FabianWolff
Copy link
Contributor

Fixes #87051. I have only modified report_return_mismatched_types(), i.e. my changes only affect suggestions to add ; for return type mismatches, but this never makes sense after ?, because the function cannot return () if ? is used (it has to return a Result or an Option), and a semicolon won't help if the expected and actual Err types differ, even if the expected one is ().

@rust-highfive
Copy link
Collaborator

r? @oli-obk

(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 11, 2021
@oli-obk
Copy link
Contributor

oli-obk commented Jul 11, 2021

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 11, 2021

📌 Commit 9946ff2 has been approved by oli-obk

@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 11, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 11, 2021
Rollup of 8 pull requests

Successful merges:

 - rust-lang#73936 (Rustdoc: Change all 'optflag' arguments to 'optflagmulti')
 - rust-lang#86926 (Update regex crates)
 - rust-lang#86951 ([docs] Clarify behaviour of f64 and f32::sqrt when argument is negative zero)
 - rust-lang#87031 (Update reference.md)
 - rust-lang#87037 (cleanup(rustdoc): remove unused function getObjectNameById)
 - rust-lang#87045 (Fix tracking issue for `bool_to_option`)
 - rust-lang#87049 (Account for `submodules = false` in config.toml when updating LLVM submodule)
 - rust-lang#87061 (Do not suggest adding a semicolon after `?`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5fcefb1 into rust-lang:master Jul 11, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"consider using a semicolon" where there already is one, after a ?
5 participants