diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-01-10 10:25:42 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-01-11 09:01:58 +0000 |
| commit | 252ac152864528ef0a6f0a54458e1ecf07a7ddfc (patch) | |
| tree | cb218f861e06dabf3bc5cb43d6e427ead5b4156e | |
| parent | 3a6bf351a39b35a662022c151621b932b4ae0bc8 (diff) | |
| download | rust-252ac152864528ef0a6f0a54458e1ecf07a7ddfc.tar.gz rust-252ac152864528ef0a6f0a54458e1ecf07a7ddfc.zip | |
Bubble up error type
| -rw-r--r-- | compiler/rustc_hir_typeck/src/closure.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_hir_typeck/src/closure.rs b/compiler/rustc_hir_typeck/src/closure.rs index 7edb5912dd5..b6b33299315 100644 --- a/compiler/rustc_hir_typeck/src/closure.rs +++ b/compiler/rustc_hir_typeck/src/closure.rs @@ -802,7 +802,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { .explicit_item_bounds(def_id) .iter_instantiated_copied(self.tcx, args) .find_map(|(p, s)| get_future_output(p.as_predicate(), s))?, - ty::Error(_) => return None, + ty::Error(_) => return Some(ret_ty), _ => span_bug!( closure_span, "async fn coroutine return type not an inference variable: {ret_ty}" |
