Remove fcx.span

This commit is contained in:
Mark-Simulacrum 2016-12-16 14:10:32 -07:00 committed by Mark Simulacrum
parent 820164582d
commit 5262113fa6
2 changed files with 3 additions and 8 deletions

View file

@ -300,10 +300,6 @@ pub struct FunctionContext<'a, 'tcx: 'a> {
// substitutions used.
pub param_substs: &'tcx Substs<'tcx>,
// The source span and nesting context where this function comes from, for
// error reporting and symbol generation.
pub span: Option<Span>,
// This function's enclosing crate context.
pub ccx: &'a CrateContext<'a, 'tcx>,
@ -360,7 +356,6 @@ impl<'a, 'tcx> FunctionContext<'a, 'tcx> {
landingpad_alloca: Cell::new(None),
fn_ty: fn_ty,
param_substs: param_substs,
span: None,
ccx: ccx,
debug_context: debug_context,
owned_builder: OwnedBuilder::new_with_ccx(ccx),

View file

@ -372,7 +372,7 @@ fn arg_local_refs<'bcx, 'tcx>(bcx: &BlockAndBuilder<'bcx, 'tcx>,
declare_local(bcx, arg_decl.name.unwrap_or(keywords::Invalid.name()),
arg_ty, scope, variable_access,
VariableKind::ArgumentVariable(arg_index + 1),
bcx.fcx().span.unwrap_or(DUMMY_SP));
DUMMY_SP);
});
return LocalRef::Lvalue(LvalueRef::new_sized(lltemp, LvalueTy::from_ty(arg_ty)));
@ -444,7 +444,7 @@ fn arg_local_refs<'bcx, 'tcx>(bcx: &BlockAndBuilder<'bcx, 'tcx>,
declare_local(bcx, arg_decl.name.unwrap_or(keywords::Invalid.name()), arg_ty,
scope, VariableAccess::DirectVariable { alloca: llval },
VariableKind::ArgumentVariable(arg_index + 1),
bcx.fcx().span.unwrap_or(DUMMY_SP));
DUMMY_SP);
return;
}
@ -513,7 +513,7 @@ fn arg_local_refs<'bcx, 'tcx>(bcx: &BlockAndBuilder<'bcx, 'tcx>,
};
declare_local(bcx, decl.debug_name, ty, scope, variable_access,
VariableKind::CapturedVariable,
bcx.fcx().span.unwrap_or(DUMMY_SP));
DUMMY_SP);
}
});
LocalRef::Lvalue(LvalueRef::new_sized(llval, LvalueTy::from_ty(arg_ty)))