Skip to content

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Dec 1, 2019

Replace the Miri-tool-specific Exit error variant with something dynamically typed that all clients of the Miri engine can use.

r? @oli-obk
Cc #66902

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 1, 2019
Exit(i32),
/// Stop execution for a machine-controlled reason. This is never raised by
/// the core engine itself.
MachineStop(Box<dyn Any + Send>),
Copy link
Contributor

Choose a reason for hiding this comment

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

I once tried out making this a generic parameter, that did not go so well (or at least infected everything)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I figured that would be quite a mess, hence the dynamically typed approach.

@oli-obk
Copy link
Contributor

oli-obk commented Dec 1, 2019

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 1, 2019

📌 Commit 4b81dd4 has been approved by oli-obk

@bors
Copy link
Collaborator

bors commented Dec 1, 2019

🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 1, 2019
Centril added a commit to Centril/rust that referenced this pull request Dec 2, 2019
add reusable MachineStop variant to Miri engine error enum

Replace the Miri-tool-specific `Exit` error variant with something dynamically typed that all clients of the Miri engine can use.

r? @oli-obk
Cc rust-lang#66902
bors added a commit that referenced this pull request Dec 2, 2019
Rollup of 7 pull requests

Successful merges:

 - #66346 (Replace .unwrap() with ? in std::os::unix::net)
 - #66789 (rustc: move mir::SourceScopeLocalData to a field of SourceScopeData.)
 - #66850 (rustc: hide HirId's fmt::Debug output from -Z span_free_formats.)
 - #66905 (rustc_plugin: Remove some remaining plugin features)
 - #66907 (rustc: don't just show raw DefIndex's in BrNamed's fmt::Debug impl.)
 - #66918 (Add crc and crypto to target feature whitelist on arm)
 - #66926 (add reusable MachineStop variant to Miri engine error enum)

Failed merges:

r? @ghost
@bors bors merged commit 4b81dd4 into rust-lang:master Dec 2, 2019
@RalfJung RalfJung deleted the miri-stop branch December 2, 2019 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants