aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/unsafe7.rs
blob: a6b69e1ac37505310a934b2b1c22f27ee9503ac3 (plain)
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" }
}