Closed
Description
Rust Information
rustc --version
: rustc 1.55.0-nightly (gentoo)
rustfmt --version
: rustfmt 1.4.37-nightly ( )
cargo --version
: cargo 1.55.0-nightly
rust-analyzer version: v0.3.794 preview
(nightly mode is enabled)
Repro
pub enum Repro {
A(i64),
B(i64),
}
fn make(a: bool, data: i64) -> Repro {
(match a {
true => Repro::A,
false => Repro::B,
}(data))
}
Issue
When I write my code as suggested, I get a warning for putting parenthesis around this match statement:
However, upon doing what the warning says, I am then greeted with a compiler error (the error persists if I put the parenthesis next to the closing brace of the match statement, as expected)