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

Introduce C++ reference wrappers #1070

Merged
merged 2 commits into from
Jun 27, 2022
Merged

Introduce C++ reference wrappers #1070

merged 2 commits into from
Jun 27, 2022

Conversation

adetaylor
Copy link
Collaborator

Fixes #1006.

This change allows a new safety policy:

  safety!(unsafe_references_wrapped)

which will disallow the concurrent existence of Rust references and C++
references to the same data.

See examples/reference-wrappers.

Progress towards fixing #1006.
@adetaylor adetaylor marked this pull request as ready for review June 27, 2022 21:58
@adetaylor adetaylor changed the title Optional mode to be paranoid about whether C++ references cause aliasing problems in Rust Introduce C++ reference wrappers Jun 27, 2022
@adetaylor adetaylor merged commit b4776fd into main Jun 27, 2022
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.

Unsafety policy which worries about returned references
1 participant