1 2 3 4 5 6 7 8 9
extern "C" { fn printf(fmt: *const i8, ...); } fn main() { let s = "hey\0"; printf(s as *const str as *const i8); // { dg-error "call to extern function" } }