diff --git a/src/librustc_trans/common.rs b/src/librustc_trans/common.rs index 7aceb0b88bb1..093e57816b96 100644 --- a/src/librustc_trans/common.rs +++ b/src/librustc_trans/common.rs @@ -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, - // 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), diff --git a/src/librustc_trans/mir/mod.rs b/src/librustc_trans/mir/mod.rs index 7ceba69c3719..15683a6bb15d 100644 --- a/src/librustc_trans/mir/mod.rs +++ b/src/librustc_trans/mir/mod.rs @@ -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)))