summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2020-05-01 22:21:17 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2020-05-01 23:26:33 +0200
commita205bbb1d286d78efbb325dac1d465c6908e0026 (patch)
tree7bcae16233dd2e780de60ac9b0832428e5c34059 /src
parentfd2384b7fab14732efde99da8affd830e2334e16 (diff)
downloadneco-a205bbb1d286d78efbb325dac1d465c6908e0026.tar
neco-a205bbb1d286d78efbb325dac1d465c6908e0026.zip
Use extern type for CStr
Diffstat (limited to 'src')
-rw-r--r--src/main.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index fe151fe..c6ec961 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -28,6 +28,11 @@ pub extern "C" fn main(_nargs: libc::c_int, _args: *const *const libc::c_char) -
}
{
+ let x = libc::string::CString::from("bar");
+ let _ = stdout.puts(&x);
+ }
+
+ {
let b = alloc::boxed::Box::new(42);
let _ = writeln!(stdout, "Bar: {}", b);
}