Repository navigation
fix misleading diagnostics and improve diagnostics of return type mismatch - #162926
Conversation
|
r? @mati865 rustbot has assigned @mati865. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
@rustbot reroll |
|
@rustbot reroll |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…match fixed misleading suggestions of adding a return and semicolon expression to an expression already in return position by adding a return position check. fixed duplicate emission of error 277 by de-duplicateing the suggestion `suggest_missing_break_or_return_expr`, where a failed normalization leads to E277
706c0b2 to
c608702
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Hey @TaKO8Ki , sorry for the ping. Mind taking a look at this when you're free? |
|
r? me |
There was a problem hiding this comment.
@bors r+ rollup
Thanks for working on this and sorry about the reviewer hot potatoing 😅
…iagnostics, r=mejrs fix misleading diagnostics and improve diagnostics of return type mismatch Fix misleading diagnostics and improve diagnostics of return type mismatch - Fixed misleading suggestions of adding a return and semicolon expression to an expression already in return position by adding a return position check. - Fixed duplicate emission of error 277 by de-duplicateing the suggestion `suggest_missing_break_or_return_expr`, where a failed normalization leads to E277 fixes: rust-lang#162271
Rollup of 8 pull requests Successful merges: - #163402 (test-float-parse: Share one table of powers of two sized for f64) - #163999 ([tiny] Show trait span for associated item with similar name) - #164020 (deduced_param_attrs for unit type offers no benefit) - #162926 (fix misleading diagnostics and improve diagnostics of return type mismatch) - #164075 (set aliases in closure error bodies to rigid with next-solver) - #164100 (More `tests/rustdoc-html` cleanups) - #164110 (callconv: mips64: Clarify why padding floats with integer args is correct) - #164120 (tests: Update duplicated-path-in-error message on musl hosts)
Rollup merge of #162926 - Hamdan-Khan:return-type-mismatch-diagnostics, r=mejrs fix misleading diagnostics and improve diagnostics of return type mismatch Fix misleading diagnostics and improve diagnostics of return type mismatch - Fixed misleading suggestions of adding a return and semicolon expression to an expression already in return position by adding a return position check. - Fixed duplicate emission of error 277 by de-duplicateing the suggestion `suggest_missing_break_or_return_expr`, where a failed normalization leads to E277 fixes: #162271
Thanks! Glad I could help :) |
Fix misleading diagnostics and improve diagnostics of return type mismatch
Fixed misleading suggestions of adding a return and semicolon expression to an expression already in return position by adding a return position check.
Fixed duplicate emission of error 277 by de-duplicateing the suggestion
suggest_missing_break_or_return_expr, where a failed normalization leads to E277fixes: #162271