]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #99350 - compiler-errors:issue-99240, r=fee1-dead
authorYuki Okushi <jtitor@2k36.org>
Sun, 17 Jul 2022 23:39:58 +0000 (08:39 +0900)
committerGitHub <noreply@github.com>
Sun, 17 Jul 2022 23:39:58 +0000 (08:39 +0900)
commitcc35c787aa67e325901ca3af74699dc7727b764d
treedd2b5cf99626d67b782ea251943ff673e77f9bfd
parent796bc7cae364b39ff7e5139842b51dd9b764060d
parent7a45a6041888c15166a9a0338483c2339da6bdf4
Rollup merge of #99350 - compiler-errors:issue-99240, r=fee1-dead

Be more precise when suggesting removal of parens on unit ctor

* Fixes #99240 by only suggesting to remove parens on path exprs, not arbitrary expressions with enum type
* Generalizes by suggesting removal of parens on unit struct, too, because why not?
compiler/rustc_typeck/src/check/expr.rs
compiler/rustc_typeck/src/check/mod.rs