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
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 cant 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