Rollup merge of #87061 - FabianWolff:issue-87051, r=oli-obk
Do not suggest adding a semicolon after `?` 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 `()`.
Showing
想要评论请 注册 或 登录