From 6d5717349c9b269fd73c6f67f42fe8937117413f Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Thu, 1 Oct 2026 18:13:03 +0200 Subject: [PATCH 1/2] fix reference id --- src/items/functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/items/functions.md b/src/items/functions.md index 25ae723a20..e542cd9e07 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] From 65b87095fec5770f5c2754e2631bb4aeb3de64de Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Thu, 1 Oct 2026 18:42:07 +0200 Subject: [PATCH 2/2] fix name to match that given in fn arg --- src/items/functions.md | 4 ++-- src/syntax-index.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/items/functions.md b/src/items/functions.md index e542cd9e07..5b8a4bd6ce 100644 --- a/src/items/functions.md +++ b/src/items/functions.md @@ -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