diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-12-06 15:32:30 -0800 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-12-08 20:49:33 -0800 |
| commit | b1dd793acdde01f7fb50b7c29bc6519e4ce3f22a (patch) | |
| tree | 6e8ceabf702d2f0a2b0c2d778e3d37a3e4fa6c69 | |
| parent | 64de44e0a12a1b933d8d01a9873cf030be2af214 (diff) | |
| download | rust-b1dd793acdde01f7fb50b7c29bc6519e4ce3f22a.tar.gz rust-b1dd793acdde01f7fb50b7c29bc6519e4ce3f22a.zip | |
Update to last master
| -rw-r--r-- | src/librustc_typeck/check/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index a43ec0aaf11..abc1c5e4b4c 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -790,8 +790,9 @@ fn check_fn<'a, 'gcx, 'tcx>(inherited: &'a Inherited<'a, 'gcx, 'tcx>, *fcx.ps.borrow_mut() = UnsafetyState::function(unsafety, unsafety_id); fcx.require_type_is_sized(ret_ty, decl.output.span(), traits::ReturnType); - fcx.ret_ty = fcx.instantiate_anon_types(&ret_ty); - fn_sig = fcx.tcx.mk_fn_sig(fn_sig.inputs().iter().cloned(), &fcx.ret_ty, fn_sig.variadic); + fcx.ret_ty = fcx.instantiate_anon_types(&Some(ret_ty)); + fn_sig = fcx.tcx.mk_fn_sig(fn_sig.inputs().iter().cloned(), &fcx.ret_ty.unwrap(), + fn_sig.variadic); { let mut visit = GatherLocalsVisitor { fcx: &fcx, }; |
