Skip to content

Commit 0740a20

Browse files
committed
Auto merge of #1037 - JOE1994:master, r=RalfJung
error code E0080 is no longer printed with MIRI error message Thanks to help from @bjorn3, @RalfJung, and @oli-obk on issue #1035 , I fixed the miri code so that error code **E0080** is no longer printed out for MIRI evaluation errors. I tested my code in my Linux machine as below. ![image](https://user-images.githubusercontent.com/10286488/68264744-e71e6c80-0017-11ea-9028-f83e19164ea2.png) Remaining concern is whether the variable name `new_tcx` which I used is misleading or not. Fixes #1035
2 parents 4ddc37d + e5675ab commit 0740a20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/eval.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc::ty::{self, TyCtxt};
99
use syntax::source_map::DUMMY_SP;
1010

1111
use crate::{
12-
struct_error, EnvVars, Evaluator, FnVal, HelpersEvalContextExt, InterpCx, InterpError,
12+
EnvVars, Evaluator, FnVal, HelpersEvalContextExt, InterpCx, InterpError,
1313
InterpResult, MemoryExtra, MiriMemoryKind, Pointer, Scalar, StackPopCleanup, Tag,
1414
TlsEvalContextExt,
1515
};
@@ -221,7 +221,7 @@ pub fn eval_main<'tcx>(tcx: TyCtxt<'tcx>, main_id: DefId, config: MiriConfig) {
221221
};
222222

223223
let msg = format!("Miri evaluation error: {}", msg);
224-
let mut err = struct_error(ecx.tcx.tcx.at(span), msg.as_str());
224+
let mut err = ecx.tcx.sess.struct_span_err(span, msg.as_str());
225225
let frames = ecx.generate_stacktrace(None);
226226
err.span_label(span, msg);
227227
// We iterate with indices because we need to look at the next frame (the caller).

0 commit comments

Comments
 (0)