Skip to content

Conversation

@JOE1994
Copy link
Contributor

@JOE1994 JOE1994 commented Nov 6, 2019

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

Remaining concern is whether the variable name new_tcx which I used is misleading or not.

Fixes #1035

src/eval.rs Outdated
let mut err = struct_error(ecx.tcx.tcx.at(span), msg.as_str());
let mut err = {
let new_tcx = ecx.tcx.tcx.at(span);
new_tcx.sess.struct_span_err(new_tcx.span, msg.as_str())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
new_tcx.sess.struct_span_err(new_tcx.span, msg.as_str())
ecx.tcx.sess.struct_span_err(span, msg.as_str())

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea, the old tcx.at dance was just because of the struct_error API, and is not really something that is relevant for struct_span_err

@RalfJung
Copy link
Member

RalfJung commented Nov 6, 2019

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Nov 6, 2019

📌 Commit e5675ab has been approved by RalfJung

bors added a commit that referenced this pull request Nov 6, 2019
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
@bors
Copy link
Contributor

bors commented Nov 6, 2019

⌛ Testing commit e5675ab with merge 0740a20...

@bors
Copy link
Contributor

bors commented Nov 6, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: RalfJung
Pushing 0740a20 to master...

@bors bors merged commit e5675ab into rust-lang:master Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Miri evaluation errors show up with error code E0080

5 participants