Rollup merge of #75007 - GuillaumeGomez:cleanup-e0743, r=pickfire
Clean up E0743 explanation r? @Dylan-DPC
This commit is contained in:
commit
2e53ac53e7
1 changed files with 5 additions and 6 deletions
|
@ -8,10 +8,9 @@ Erroneous code example:
|
|||
fn foo2(x: u8, y: &...) {} // error!
|
||||
```
|
||||
|
||||
Only foreign functions can use the C-variadic type (`...`).
|
||||
In such functions, `...` may only occur non-nested.
|
||||
That is, `y: &'a ...` is not allowed.
|
||||
Only foreign functions can use the C-variadic type (`...`). In such functions,
|
||||
`...` may only occur non-nested. That is, `y: &'a ...` is not allowed.
|
||||
|
||||
A C-variadic type is used to give an undefined number
|
||||
of parameters to a given function (like `printf` in C).
|
||||
The equivalent in Rust would be to use macros directly.
|
||||
A C-variadic type is used to give an undefined number of parameters to a given
|
||||
function (like `printf` in C). The equivalent in Rust would be to use macros
|
||||
directly (like `println!` for example).
|
||||
|
|
Loading…
Add table
Reference in a new issue