@@ -2,6 +2,7 @@ use std::mem;
22
33use rustc_errors:: { DiagArgName , DiagArgValue , DiagMessage , IntoDiagnostic , IntoDiagnosticArg } ;
44use rustc_hir:: CRATE_HIR_ID ;
5+ use rustc_middle:: mir:: interpret:: Provenance ;
56use rustc_middle:: mir:: AssertKind ;
67use rustc_middle:: query:: TyCtxtAt ;
78use rustc_middle:: ty:: TyCtxt ;
@@ -58,12 +59,12 @@ impl<'tcx> Into<InterpErrorInfo<'tcx>> for ConstEvalErrKind {
5859
5960pub fn get_span_and_frames < ' tcx , ' mir > (
6061 tcx : TyCtxtAt < ' tcx > ,
61- machine : & CompileTimeInterpreter < ' mir , ' tcx > ,
62+ stack : & [ Frame < ' mir , ' tcx , impl Provenance , impl Sized > ] ,
6263) -> ( Span , Vec < errors:: FrameNote > )
6364where
6465 ' tcx : ' mir ,
6566{
66- let mut stacktrace = Frame :: generate_stacktrace_from_stack ( & machine . stack ) ;
67+ let mut stacktrace = Frame :: generate_stacktrace_from_stack ( stack) ;
6768 // Filter out `requires_caller_location` frames.
6869 stacktrace. retain ( |frame| !frame. instance . def . requires_caller_location ( * tcx) ) ;
6970 let span = stacktrace. first ( ) . map ( |f| f. span ) . unwrap_or ( tcx. span ) ;
@@ -167,7 +168,7 @@ pub(super) fn lint<'tcx, 'mir, L>(
167168) where
168169 L : for < ' a > rustc_errors:: DecorateLint < ' a , ( ) > ,
169170{
170- let ( span, frames) = get_span_and_frames ( tcx, machine) ;
171+ let ( span, frames) = get_span_and_frames ( tcx, & machine. stack ) ;
171172
172173 tcx. emit_node_span_lint (
173174 lint,
0 commit comments