]> git.lizzy.rs Git - rust.git/commitdiff
guide-pointers.md: C sample code should match the Rust version.
authorNODA, Kai <nodakai@gmail.com>
Wed, 24 Sep 2014 13:47:11 +0000 (21:47 +0800)
committerNODA, Kai <nodakai@gmail.com>
Wed, 24 Sep 2014 13:53:11 +0000 (21:53 +0800)
Fix rust-lang/rust#17255

src/doc/guide-pointers.md

index 6492400a2cfc7bc477939b73110657444e33e85b..b920ffbdd1a1858de279a62f3f23c2fb5ceb575a 100644 (file)
@@ -505,6 +505,7 @@ As being similar to this C code:
 {
     int *x;
     x = (int *)malloc(sizeof(int));
+    *x = 5;
 
     // stuff happens