unnecessary parentheses warning triggers for necessary parentheses around yield
expression
#74883
Labels
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
F-coroutines
`#![feature(coroutines)]`
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: no warning
Instead, this happened:
if I follow the suggestion, then compilation fails:
(
yield
takes an optional expression, not wrapping it in parentheses means thewhile let
block becomes that expression, and thewhile let
is then missing a block).Meta
clippy 0.0.212 (2020-07-27 76e8333)
The text was updated successfully, but these errors were encountered: