diff options
| author | leonardo.yvens <leoyvens@gmail.com> | 2018-05-15 15:42:41 -0300 |
|---|---|---|
| committer | Pietro Albini <pietro@pietroalbini.org> | 2018-05-21 15:59:29 +0200 |
| commit | c05689b04e1d1947e7cdcc80243dcd84badb65cb (patch) | |
| tree | 767269a3ef2dc4578effd79dbc3ba6f490916e6c /src | |
| parent | b48588726eeb35c79ad7a09dc74732f16bef5253 (diff) | |
| download | rust-c05689b04e1d1947e7cdcc80243dcd84badb65cb.tar.gz rust-c05689b04e1d1947e7cdcc80243dcd84badb65cb.zip | |
Rename ret_ty to declared_ret_ty
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_typeck/check/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 81e6efc7898..61c1bdb7110 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -1036,9 +1036,9 @@ fn check_fn<'a, 'gcx, 'tcx>(inherited: &'a Inherited<'a, 'gcx, 'tcx>, let mut fcx = FnCtxt::new(inherited, param_env, body.value.id); *fcx.ps.borrow_mut() = UnsafetyState::function(fn_sig.unsafety, fn_id); - let ret_ty = fn_sig.output(); - fcx.require_type_is_sized(ret_ty, decl.output.span(), traits::SizedReturnType); - let revealed_ret_ty = fcx.instantiate_anon_types_from_return_value(fn_id, &ret_ty); + let declared_ret_ty = fn_sig.output(); + fcx.require_type_is_sized(declared_ret_ty, decl.output.span(), traits::SizedReturnType); + let revealed_ret_ty = fcx.instantiate_anon_types_from_return_value(fn_id, &declared_ret_ty); fcx.ret_coercion = Some(RefCell::new(CoerceMany::new(revealed_ret_ty))); fn_sig = fcx.tcx.mk_fn_sig( fn_sig.inputs().iter().cloned(), @@ -1132,7 +1132,7 @@ fn check_fn<'a, 'gcx, 'tcx>(inherited: &'a Inherited<'a, 'gcx, 'tcx>, if id == fn_id { match entry_type { config::EntryMain => { - let substs = fcx.tcx.mk_substs(iter::once(Kind::from(ret_ty))); + let substs = fcx.tcx.mk_substs(iter::once(Kind::from(declared_ret_ty))); let trait_ref = ty::TraitRef::new(term_id, substs); let return_ty_span = decl.output.span(); let cause = traits::ObligationCause::new( |
