diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-08-23 11:14:11 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-08-23 11:59:04 -0700 |
| commit | 73e3508bb84bec2911f56e5c2463eee3688cf8ac (patch) | |
| tree | cca393bb32210da909fea615906f4dcd21a56e77 /src/librustc | |
| parent | 7b0085a613e69cb69fc9e4eb5d422fa4a39d5de1 (diff) | |
| download | rust-73e3508bb84bec2911f56e5c2463eee3688cf8ac.tar.gz rust-73e3508bb84bec2911f56e5c2463eee3688cf8ac.zip | |
Suggest calling closure with resolved return type when appropriate
Diffstat (limited to 'src/librustc')
| -rw-r--r-- | src/librustc/ty/sty.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc/ty/sty.rs b/src/librustc/ty/sty.rs index da66fdf5b1b..7b7e2b8bfbd 100644 --- a/src/librustc/ty/sty.rs +++ b/src/librustc/ty/sty.rs @@ -385,7 +385,8 @@ impl<'tcx> ClosureSubsts<'tcx> { let ty = self.closure_sig_ty(def_id, tcx); match ty.sty { ty::FnPtr(sig) => sig, - _ => bug!("closure_sig_ty is not a fn-ptr: {:?}", ty), + ty::Infer(_) | ty::Error => ty::Binder::dummy(FnSig::fake()), // ignore errors + _ => bug!("closure_sig_ty is not a fn-ptr: {:?}", ty.sty), } } } |
