-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Description
I'm unsure if even the non-mut AsciiStr <-> [AsciiChar] slice transmutes like this one here are sound, since you generally can't assume that the outer type is compatible with the inner type without using #[repr(transparent)]:
Lines 350 to 353 in 296c3a8
fn from(slice: &[AsciiChar]) -> &AsciiStr { | |
let ptr = slice as *const [AsciiChar] as *const AsciiStr; | |
unsafe { &*ptr } | |
} |
Metadata
Metadata
Assignees
Labels
No labels