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

MIRI workarounds possibly not needed? #1

Closed
nico-abram opened this issue Mar 25, 2022 · 1 comment
Closed

MIRI workarounds possibly not needed? #1

nico-abram opened this issue Mar 25, 2022 · 1 comment

Comments

@nico-abram
Copy link

Since rust-lang/miri#1952 MIRI understands the Unpin workaround, so maybe the MIRI cfg is no longer needed.

That said, to quote RalfJ from that PR:

But can an &Aliasable or &mut Aliasable coexist with an &mut T (or to a field of T)?

&mut T (with this patch: for T: Unpin) cannot coexist with anything (assuming both pointers are being used). Weakening that guarantee would make it entirely useless for optimizations.

But &mut T can be reborrowed from &mut Aliasable, as long as for the time that the &mut T is active, no other reference/pointer to that memory is used.

Which seems to contradict the readme:

so that one &mut Aliasable and either one &mut T or any number of &Ts can coexist

@SabrinaJewson
Copy link
Owner

Thanks for noticing this, I've removed the workaround now - it seems that change was made after I intially wrote this crate.

SabrinaJewson added a commit that referenced this issue Aug 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

No branches or pull requests

2 participants