diff --git a/src/librustc_mir/const_eval/error.rs b/src/librustc_mir/const_eval/error.rs index f72278456bd..f7e28cf8d8c 100644 --- a/src/librustc_mir/const_eval/error.rs +++ b/src/librustc_mir/const_eval/error.rs @@ -55,6 +55,6 @@ pub fn error_to_const_error<'mir, 'tcx, M: Machine<'mir, 'tcx>>( mut error: InterpErrorInfo<'tcx>, ) -> ConstEvalErr<'tcx> { error.print_backtrace(); - let stacktrace = ecx.generate_stacktrace(None); + let stacktrace = ecx.generate_stacktrace(); ConstEvalErr { error: error.kind, stacktrace, span: ecx.tcx.span } } diff --git a/src/librustc_mir/interpret/eval_context.rs b/src/librustc_mir/interpret/eval_context.rs index cf80e55ae45..8f24fc451bc 100644 --- a/src/librustc_mir/interpret/eval_context.rs +++ b/src/librustc_mir/interpret/eval_context.rs @@ -17,7 +17,7 @@ use rustc_middle::ty::layout::{self, Align, HasDataLayout, LayoutOf, Size, TyAnd use rustc_middle::ty::query::TyCtxtAt; use rustc_middle::ty::subst::SubstsRef; use rustc_middle::ty::{self, Ty, TyCtxt, TypeFoldable}; -use rustc_span::source_map::{Span, DUMMY_SP}; +use rustc_span::source_map::DUMMY_SP; use super::{ Immediate, MPlaceTy, Machine, MemPlace, MemPlaceMeta, Memory, OpTy, Operand, Place, PlaceTy, @@ -853,7 +853,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { } } - pub fn generate_stacktrace(&self, explicit_span: Option) -> Vec> { + pub fn generate_stacktrace(&self) -> Vec> { let mut frames = Vec::new(); for frame in self.stack().iter().rev() { let source_info = frame.current_source_info(); @@ -867,7 +867,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { frames.push(FrameInfo { span, instance: frame.instance, lint_root }); } - trace!("generate stacktrace: {:#?}, {:?}", frames, explicit_span); + trace!("generate stacktrace: {:#?}", frames); frames } }