Skip to content

AddressSpace::remove_mapping should take MapEntry #14

@rileyshahar

Description

@rileyshahar

Want to raise this as a discussion issue rather than just writing the PR, but I think that remove_mapping should just take a MapEntry as argument. In particular, this will let us use the borrow checker to check lifetimes of mappings, since remove_mapping will drop the MapEntry, so we can guarantee that the user no longer has a reference to it after it's removed. (On a broader note, this is why I don't like the idea of "fighting the borrow-checker": this is a case where we can make the borrow-checker work for us to ensure correctness, not just to ensure memory safety.)

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