Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/items/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Function parameters are irrefutable [patterns], so any pattern that is valid in
fn first((value, _): (i32, i32)) -> i32 { value }
```

r[items.fn.params.self-pat]
r[items.fn.params.self-param]
If the first parameter is a [SelfParam], this indicates that the function is a [method].

r[items.fn.params.self-restriction]
Expand Down Expand Up @@ -420,7 +420,7 @@ r[items.fn.c-variadic]
## C-variadic functions

r[items.fn.c-variadic.intro]
A *C-variadic* function accepts a variable argument list `pat: ...` as its final parameter.
A *C-variadic* function accepts a variable argument list `ap: ...` as its final parameter.

```rust
unsafe extern "C" fn f(mut ap: ...) -> f64 {
Expand All @@ -435,7 +435,7 @@ unsafe extern "C" fn f(ap: ..., _: ()) {} // ERROR: `...` must be last.
This parameter stands in for an arbitrary number of arguments that may be passed by the caller.

r[items.fn.c-variadic.parameter-type]
The type of `pat` in the function body is [`VaList<'_>`].
The type of `ap` in the function body is [`VaList<'_>`].

```rust
# use core::ffi::VaList;
Expand Down
2 changes: 1 addition & 1 deletion src/syntax-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ This appendix provides an index of tokens and common forms with links to where t
[reserved keyword]: lex.keywords.reserved
[rest pattern]: patterns.rest
[return expressions]: expr.return
[self parameters]: items.fn.params.self-pat
[self parameters]: items.fn.params.self-param
[single-element tuple expressions]: expr.tuple
[slice patterns]: patterns.slice
[slice types]: type.slice
Expand Down
Loading