Debian Codegraph @

gcc/testsuite/rust/execute/torture/helloworld2.rs

raw
1 /* { dg-output "Hello World 123\r*\n" }*/
2 extern "C" {
3 fn printf(s: *const i8, ...);
4 }
5
6 fn main() -> i32 {
7 unsafe {
8 let a = "Hello World %i\n";
9 let b = a as *const str;
10 let c = b as *const i8;
11
12 printf(c, 123);
13 }
14 0
15 }