Skip to content

Commit b1dd793

Browse files
Update to last master
1 parent 64de44e commit b1dd793

File tree

1 file changed

+3
-2
lines changed
  • src/librustc_typeck/check

1 file changed

+3
-2
lines changed

src/librustc_typeck/check/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -790,8 +790,9 @@ fn check_fn<'a, 'gcx, 'tcx>(inherited: &'a Inherited<'a, 'gcx, 'tcx>,
790790
*fcx.ps.borrow_mut() = UnsafetyState::function(unsafety, unsafety_id);
791791

792792
fcx.require_type_is_sized(ret_ty, decl.output.span(), traits::ReturnType);
793-
fcx.ret_ty = fcx.instantiate_anon_types(&ret_ty);
794-
fn_sig = fcx.tcx.mk_fn_sig(fn_sig.inputs().iter().cloned(), &fcx.ret_ty, fn_sig.variadic);
793+
fcx.ret_ty = fcx.instantiate_anon_types(&Some(ret_ty));
794+
fn_sig = fcx.tcx.mk_fn_sig(fn_sig.inputs().iter().cloned(), &fcx.ret_ty.unwrap(),
795+
fn_sig.variadic);
795796

796797
{
797798
let mut visit = GatherLocalsVisitor { fcx: &fcx, };

0 commit comments

Comments
 (0)