Add missing syntax highlighting in Variadic Macros sexion in FFI

This commit is contained in:
nabijaczleweli 2018-02-26 07:12:32 +01:00
parent 92099e1460
commit 68e95ec7c4
No known key found for this signature in database
GPG Key ID: BCFD0B018D2658F1
1 changed files with 3 additions and 3 deletions

View File

@ -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 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: be achieved in Rust by specifying `...` within the argument list of a foreign function declaration:
```no_run ```rust,no_run
extern { extern {
fn foo(x: i32, ...); fn foo(x: i32, ...);
} }
@ -584,7 +584,7 @@ fn main() {
Normal Rust functions can *not* be variadic: Normal Rust functions can *not* be variadic:
```ignore ```rust,ignore
// This will not compile // This will not compile
fn foo(x: i32, ...) { } fn foo(x: i32, ...) { }
@ -750,7 +750,7 @@ extern "C" {
# fn main() {} # 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 cant instantiate outside of this module. we create an opaque type that we cant instantiate outside of this module.
An empty array is both zero-size and compatible with `#[repr(C)]`. An empty array is both zero-size and compatible with `#[repr(C)]`.
But because our `Foo` and `Bar` types are But because our `Foo` and `Bar` types are