mirror of https://github.com/rust-lang/book
Add missing syntax highlighting in Variadic Macros sexion in FFI
This commit is contained in:
parent
92099e1460
commit
68e95ec7c4
|
@ -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, ...) { }
|
||||
|
|
Loading…
Reference in New Issue