try_validation
unconditionally adds semicolons
#6242
Labels
C-bug
Category: Clippy is not doing the correct thing
try_validation
unconditionally adds semicolons
#6242
I tried this code (https://github.com/rust-lang/rust/blob/0da6d42f297642a60f2640ec313b879b376b9ad8/compiler/rustc_mir/src/interpret/validity.rs#L78-L96):
I expected to see this happen: The
Err(e)?
is replaced withreturn Err(e)
.Instead, this happened: It's replaced with
return Err(e);
, causing a syntax error since this is an expression context.Meta
cargo clippy -V
: clippy 0.0.212 (ffa2e7a 2020-10-24)The text was updated successfully, but these errors were encountered: