Skip to content

Commit 252ac15

Browse files
committed
Bubble up error type
1 parent 3a6bf35 commit 252ac15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_hir_typeck/src/closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
802802
.explicit_item_bounds(def_id)
803803
.iter_instantiated_copied(self.tcx, args)
804804
.find_map(|(p, s)| get_future_output(p.as_predicate(), s))?,
805-
ty::Error(_) => return None,
805+
ty::Error(_) => return Some(ret_ty),
806806
_ => span_bug!(
807807
closure_span,
808808
"async fn coroutine return type not an inference variable: {ret_ty}"

0 commit comments

Comments
 (0)