hide closure ret hints if ret type is specified

fixes #12319
This commit is contained in:
NotWearingPants
2022-05-20 02:35:37 +03:00
committed by GitHub
parent bf37fe23f3
commit 641b78a162

View File

@@ -463,6 +463,10 @@ fn closure_ret_hints(
return None;
}
if closure.ret_type().is_some() {
return None;
}
let param_list = match closure.body() {
Some(ast::Expr::BlockExpr(_)) => closure.param_list()?,
_ => return None,