• nickA
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    9 months ago

    That flag exists, it’s called unsafe for if you need to tell the borrow checker to trust you or unwrap if you don’t want to deal with handling errors on most ADTs.

    You can always cast anything to an unmanaged pointer type and use it in unsafe code.