Replace `rust_repositories` with `rust_register_toolchains` in docs (#1237)

diff --git a/docs/index.md b/docs/index.md
index 4a4fe83..66139a7 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -62,22 +62,22 @@
 
 ## Specifying Rust version
 
-To build with a particular version of the Rust compiler, pass that version to [`rust_repositories`](flatten.md#rust_repositories):
+To build with a particular version of the Rust compiler, pass that version to [`rust_register_toolchains`](flatten.md#rust_register_toolchains):
 
 ```python
-rust_repositories(version = "1.59.0", edition="2018")
+rust_register_toolchains(version = "1.59.0", edition="2018")
 ```
 
 As well as an exact version, `version` can be set to `"nightly"` or `"beta"`. If set to these values, `iso_date` must also be set:
 
 ```python
-rust_repositories(version = "nightly", iso_date = "2022-02-23", edition="2018")
+rust_register_toolchains(version = "nightly", iso_date = "2022-02-23", edition="2018")
 ```
 
 Similarly, `rustfmt_version` may also be configured:
 
 ```python
-rust_repositories(rustfmt_version = "1.59.0")
+rust_register_toolchains(rustfmt_version = "1.59.0")
 ```
 
 ## External Dependencies