Skip to content

The Place trait should be unsafe. #1391

@Stebalien

Description

@Stebalien

Rust will blindly write into whatever pointer is returned by Place::pointer() so the trait itself should be unsafe to implement.

pub unsafe trait Place<Data> where Data: ?Sized {
    fn pointer(&mut self) -> *mut Data;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-libs-apiRelevant to the library API team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions