From c9152f02cc141accf917a7f2d49e93db9c76bcd3 Mon Sep 17 00:00:00 2001 From: Ali MJ Al-Nasrawy Date: Fri, 6 May 2022 23:38:20 +0300 Subject: [PATCH] correct type of SubstsRef --- src/generics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generics.md b/src/generics.md index c7a0be093..13549b2fb 100644 --- a/src/generics.md +++ b/src/generics.md @@ -10,7 +10,7 @@ In rustc this is done using the `SubstsRef` that we mentioned above (“substs Conceptually, you can think of `SubstsRef` as a list of types that are to be substituted for the generic type parameters of the ADT. -`SubstsRef` is a type alias of `List>` (see [`List` rustdocs][list]). +`SubstsRef` is a type alias of `&'tcx List>` (see [`List` rustdocs][list]). [`GenericArg`] is essentially a space-efficient wrapper around [`GenericArgKind`], which is an enum indicating what kind of generic the type parameter is (type, lifetime, or const). Thus, `SubstsRef` is conceptually like a `&'tcx [GenericArgKind<'tcx>]` slice (but it is actually a `List`).