Code Room
Code reviewHard
Question
Review this Rust FFI-style helper using raw pointers.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
fn make_label() -> *const u8 { let s = String::from("ready"); s.as_ptr()} fn main() { let p = make_label(); unsafe { let slice = std::slice::from_raw_parts(p, 5); println!("{:?}", std::str::from_utf8_unchecked(slice)); }}Run or narrate your approach, then ask the coach.