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

The unstable --c-lib option now requires -Z c-ffi to enable C-FFI support #2425

Merged
merged 3 commits into from
May 3, 2023

Conversation

celinval
Copy link
Contributor

@celinval celinval commented May 3, 2023

Description of changes:

This will also give visibility to the compiler to whether this feature is enabled or not which is needed to avoid type mismatch issue (#1781).

Resolved issues:

Related to #1781

Related RFC:

#2281

Call-outs:

  1. I am not sure I should use -Z unstable-options here. This seems like over-killing having to use -Z c-ffi and -Z unstable-options.
  2. While updating the tests, I notice that the test for Option<&foo> does not decay to *foo in extern C mode #3 wasn't really testing anything. So I removed it and replaced it with a minimum test for the Option<&T> -> *T decay.

Testing:

  • How is this change tested? Modified tests

  • Is this a refactor change? Yes

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

This will also give visibility to the compiler to whether this feature
is enabled or not which is needed to avoid type mismatch issue
(model-checking#1781).
@celinval celinval requested a review from a team as a code owner May 3, 2023 19:03
tests/kani/ForeignItems/fixme_option_ref.rs Outdated Show resolved Hide resolved
Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
@celinval celinval enabled auto-merge (squash) May 3, 2023 21:54
@celinval celinval merged commit 6bc2e38 into model-checking:main May 3, 2023
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.

2 participants