about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorTshepang Mbambo <tshepang@gmail.com>2023-03-21 10:55:42 +0200
committerGitHub <noreply@github.com>2023-03-21 17:55:42 +0900
commit8448fc10e6b6f2ab13ba957fbd2ff35c90aa9474 (patch)
treed9585d0faa7939a1e2279c396e4b77c53098ebd9 /src/doc/rustc-dev-guide
parentf24518948220486be647936cdc3347dd363fbd43 (diff)
downloadrust-8448fc10e6b6f2ab13ba957fbd2ff35c90aa9474.tar.gz
rust-8448fc10e6b6f2ab13ba957fbd2ff35c90aa9474.zip
first mention of type, and add a link (#1643)
Co-authored-by: Yuki Okushi <jtitor@2k36.org>
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/generics.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/doc/rustc-dev-guide/src/generics.md b/src/doc/rustc-dev-guide/src/generics.md
index cbfd01e84da..7512b3b47c2 100644
--- a/src/doc/rustc-dev-guide/src/generics.md
+++ b/src/doc/rustc-dev-guide/src/generics.md
@@ -6,7 +6,7 @@ inference, type checking, and trait solving. Conceptually, during these routines
 that one type is equal to another type and want to swap one out for the other and then swap that out
 for another type and so on until we eventually get some concrete types (or an error).
 
-In rustc this is done using the `SubstsRef` that we mentioned above (“substs” = “substitutions”).
+In rustc this is done using [SubstsRef] (“substs” = “substitutions”).
 Conceptually, you can think of `SubstsRef` as a list of types that are to be substituted for the
 generic type parameters of the ADT.
 
@@ -18,6 +18,7 @@ is conceptually like a `&'tcx [GenericArgKind<'tcx>]` slice (but it is actually
 [list]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.List.html
 [`GenericArg`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/subst/struct.GenericArg.html
 [`GenericArgKind`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/subst/enum.GenericArgKind.html
+[SubstsRef]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/subst/type.SubstsRef.html
 
 So why do we use this `List` type instead of making it really a slice? It has the length "inline",
 so `&List` is only 32 bits. As a consequence, it cannot be "subsliced" (that only works if the