diff --git a/src/items/functions.md b/src/items/functions.md index 25ae723a20..5b8a4bd6ce 100644 --- a/src/items/functions.md +++ b/src/items/functions.md @@ -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] @@ -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 { @@ -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; diff --git a/src/syntax-index.md b/src/syntax-index.md index ea7d058490..20957da8ce 100644 --- a/src/syntax-index.md +++ b/src/syntax-index.md @@ -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