Skip to content

show proper error when using a sysroot without MIR #1856

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2021

Conversation

RalfJung
Copy link
Member

Fixes #1834

@@ -132,8 +132,6 @@ pub fn report_error<'tcx, 'mir>(
};
#[rustfmt::skip]
let helps = match e.kind() {
Unsupported(UnsupportedOpInfo::NoMirFor(..)) =>
Copy link
Member Author

Choose a reason for hiding this comment

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

This error is never raised by Miri anyway, and I will try to remove this error variant from rustc.

@RalfJung
Copy link
Member Author

@bors r+

@bors
Copy link
Contributor

bors commented Jul 25, 2021

📌 Commit 46d31f9 has been approved by RalfJung

@bors
Copy link
Contributor

bors commented Jul 25, 2021

⌛ Testing commit 46d31f9 with merge eb9e307...

@bors
Copy link
Contributor

bors commented Jul 25, 2021

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing eb9e307 to master...

@bors bors merged commit eb9e307 into rust-lang:master Jul 25, 2021
@RalfJung RalfJung deleted the no-mir branch July 26, 2021 15:54
@RalfJung
Copy link
Member Author

@oli-obk I should probably have waited instead of landing this myself... sorry for that. I can rework this to a different approach if you'd prefer that. (The alternative is to have a query that returns Option<mir::Body>, instead of ICEing when there is no MIR body.)

@oli-obk
Copy link
Contributor

oli-obk commented Jul 26, 2021

ICEing is fine by me, I see no use case for handling it gently right now

@RalfJung
Copy link
Member Author

Well the usecase would be that we'd not have to use this hack of checking a sentinel function; instead we'd try to load the MIR on each function call and then throw a proper interpreter error when it is missing.

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.

Improve errors when invoked with wrong sysroot (missing MIR)
3 participants