rust/compiler/rustc_typeck
bors d00e77078c Auto merge of #95758 - compiler-errors:issue-54771, r=estebank
Only suggest removing semicolon when expression is compatible with `impl Trait`

https://github.com/rust-lang/rust/issues/54771#issuecomment-476423690
> It still needs checking that the last statement's expr can actually conform to the trait, but the naïve behavior is there.

Only suggest removing a semicolon when the type behind the semicolon actually implements the trait in an RPIT `-> impl Trait`. Also upgrade the label that suggests removing the semicolon to a suggestion (should it be verbose?).

cc #54771
2022-04-11 08:31:37 +00:00
..
src Auto merge of #95758 - compiler-errors:issue-54771, r=estebank 2022-04-11 08:31:37 +00:00
Cargo.toml
README.md

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.