From 68e95ec7c43a31e4f1e002f53c5ba3384ed4b3a5 Mon Sep 17 00:00:00 2001 From: nabijaczleweli Date: Mon, 26 Feb 2018 07:12:32 +0100 Subject: [PATCH] Add missing syntax highlighting in Variadic Macros sexion in FFI --- first-edition/src/ffi.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/first-edition/src/ffi.md b/first-edition/src/ffi.md index 0c01396c7..e01bf1830 100644 --- a/first-edition/src/ffi.md +++ b/first-edition/src/ffi.md @@ -570,7 +570,7 @@ against `libc` and `libm` by default. In C, functions can be 'variadic', meaning they accept a variable number of arguments. This can be achieved in Rust by specifying `...` within the argument list of a foreign function declaration: -```no_run +```rust,no_run extern { fn foo(x: i32, ...); } @@ -584,7 +584,7 @@ fn main() { Normal Rust functions can *not* be variadic: -```ignore +```rust,ignore // This will not compile fn foo(x: i32, ...) { } @@ -750,7 +750,7 @@ extern "C" { # fn main() {} ``` -By including a private field and no constructor, +By including a private field and no constructor, we create an opaque type that we can’t instantiate outside of this module. An empty array is both zero-size and compatible with `#[repr(C)]`. But because our `Foo` and `Bar` types are