]> git.lizzy.rs Git - rust.git/commitdiff
Update to last master
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Tue, 6 Dec 2016 23:32:30 +0000 (15:32 -0800)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Fri, 9 Dec 2016 04:49:33 +0000 (20:49 -0800)
src/librustc_typeck/check/mod.rs

index a43ec0aaf11f1c294b68fa6142485002335287e8..abc1c5e4b4cc90409d90a71772874068fd2e5e17 100644 (file)
@@ -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, };