Skip to content
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

Consider producing empty slices under cfg(miri) #62

Open
dtolnay opened this issue Jan 15, 2023 · 0 comments
Open

Consider producing empty slices under cfg(miri) #62

dtolnay opened this issue Jan 15, 2023 · 0 comments

Comments

@dtolnay
Copy link
Owner

dtolnay commented Jan 15, 2023

Currently accessing a distributed slice under Miri makes the interpreter abort.

test readme ... error: unsupported operation: `extern` static `BENCHMARKS::LINKME_START` from crate `example` is not supported by Miri
  --> tests/example.rs:22:19
   |
22 |     for _bench in BENCHMARKS { /* ... */ }
   |                   ^^^^^^^^^^ `extern` static `BENCHMARKS::LINKME_START` from crate `example` is not supported by Miri
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
   = note: BACKTRACE:
   = note: inside `readme` at tests/example.rs:22:19: 22:29

It would be reasonable to use cfg(miri) to produce a Miri-compatible stub implementation that always contains no elements.

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

No branches or pull requests

1 participant