You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add definition of a fat pointer, double pointer, and wide pointer
Definition referenced from Programming Rust by Jim Blandy & Jason
Orendorff, published by O'Reilly. Page 214: References to Slices
and Trait Objects.
Double pointer and wide pointer both refer to fat pointer for
detail.
Copy file name to clipboardExpand all lines: src/appendix-glossary.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,8 @@ cx | we tend to use "cx" as an abbrevation for context. Se
16
16
DAG | a directed acyclic graph is used during compilation to keep track of dependencies between queries. ([see more](incremental-compilation.html))
17
17
data-flow analysis | a static analysis that figures out what properties are true at each point in the control-flow of a program; see [the background chapter for more](./appendix-background.html#dataflow)
18
18
DefId | an index identifying a definition (see `librustc/hir/def_id.rs`). Uniquely identifies a `DefPath`.
19
-
Fat pointer | a two word value carrying the address of some value, along with some further information necessary to put the value to use. For example: a reference to a slice is a fat pointer, carrying the starting address of the slice and its length.
19
+
Double pointer | a pointer with additional metadata. See "fat pointer" for more.
20
+
Fat pointer | a two word value carrying the address of some value, along with some further information necessary to put the value to use. Rust includes two kinds of "fat pointers": references to slices, and trait objects. A reference to a slice carries the starting address of the slice and its length. A trait object carries a value's address and a pointer to the trait's implementation appropriate to that value. "Fat pointers" are also known as "wide pointers", and "double pointers".
20
21
free variable | a "free variable" is one that is not bound within an expression or term; see [the background chapter for more](./appendix-background.html#free-vs-bound)
21
22
'gcx | the lifetime of the global arena ([see more](ty.html))
22
23
generics | the set of generic type parameters defined on a type or item
@@ -61,6 +62,7 @@ trait reference | a trait and values for its type parameters ([see more
61
62
ty | the internal representation of a type ([see more](ty.html)).
62
63
UFCS | Universal Function Call Syntax. An unambiguous syntax for calling a method ([see more](type-checking.html)).
63
64
variance | variance determines how changes to a generic type/lifetime parameter affect subtyping; for example, if `T` is a subtype of `U`, then `Vec<T>` is a subtype `Vec<U>` because `Vec` is *covariant* in its generic parameter. See [the background chapter](./appendix-background.html#variance) for a more general explanation. See the [variance chapter](./variance.html) for an explanation of how type checking handles variance.
65
+
Wide pointer | a pointer with additional metadata. See "fat pointer" for more.
0 commit comments