]> git.lizzy.rs Git - rust.git/commit
Merge #11842
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>
Tue, 29 Mar 2022 16:10:20 +0000 (16:10 +0000)
committerGitHub <noreply@github.com>
Tue, 29 Mar 2022 16:10:20 +0000 (16:10 +0000)
commit9eb7553d5ab7cd512b7edf8d8a30b191be0dc761
tree816fd2ec86cf2666dcd9e46aa12efca10f2a9bba
parent89d495eb306544ecb1c3e9471725cefb4c87d203
parent0c4bdd2f32d212158cf831720d5379de9907f0a6
Merge #11842

11842: Fix duplicate type mismatches with blocks r=flodiebold a=flodiebold

E.g. when there's a type mismatch on the return value of a function. To fix this, we have to return the expected type as the type of the block when there's a mismatch. That meant some IDE code that expected otherwise had to be adapted, in particular the "add return type" assist. For the "wrap in Ok/Some" quickfix, this sadly means it usually can't be applied in all branches of an if expression at the same time anymore, because there's a type mismatch for each branch that has the wrong type.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>