No need to pass parent of block for BlockTailExpression
This commit is contained in:
parent
ffdf277618
commit
5915850071
@ -1591,14 +1591,13 @@ pub(crate) fn coerce_inner<'a>(
|
||||
err.span_label(cause.span, "return type is not `()`");
|
||||
}
|
||||
ObligationCauseCode::BlockTailExpression(blk_id, ..) => {
|
||||
let parent_id = fcx.tcx.parent_hir_id(blk_id);
|
||||
err = self.report_return_mismatched_types(
|
||||
cause,
|
||||
expected,
|
||||
found,
|
||||
coercion_error,
|
||||
fcx,
|
||||
parent_id,
|
||||
blk_id,
|
||||
expression,
|
||||
Some(blk_id),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user