Skip to content

MIRI workarounds possibly not needed? #1

Closed
@nico-abram

Description

@nico-abram

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions