From a13b7c28ed705891c681ce5417b3d1cdb12cecd1 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Sun, 24 Sep 2023 21:36:50 +0000 Subject: [PATCH] impl traits --- src/appendix/glossary.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/appendix/glossary.md b/src/appendix/glossary.md index 398beb6dae6c4..27b6cddf291a1 100644 --- a/src/appendix/glossary.md +++ b/src/appendix/glossary.md @@ -5,6 +5,7 @@ Term | Meaning ------------------------------------------------------|-------- arena/arena allocation   | An _arena_ is a large memory buffer from which other memory allocations are made. This style of allocation is called _arena allocation_. See [this chapter](../memory.md) for more info. AST   | The abstract syntax tree produced by the `rustc_ast` crate; reflects user syntax very closely. +APIT   | An argument-position `impl Trait`. Also known as an anonymous type parameter. ([see the reference](https://doc.rust-lang.org/reference/types/impl-trait.html#anonymous-type-parameters)). binder   | A "binder" is a place where a variable or type is declared; for example, the `` is a binder for the generic type parameter `T` in `fn foo(..)`, and \|`a`\|` ...` is a binder for the parameter `a`. See [the background chapter for more](./background.md#free-vs-bound). BodyId   | An identifier that refers to a specific body (definition of a function or constant) in the crate. See [the HIR chapter for more](../hir.md#identifiers-in-the-hir). bound variable   | A "bound variable" is one that is declared within an expression/term. For example, the variable `a` is bound within the closure expression \|`a`\|` a * 2`. See [the background chapter for more](./background.md#free-vs-bound) @@ -67,6 +68,8 @@ Term | Meaning recovery   | Recovery refers to handling invalid syntax during parsing (e.g. a missing comma) and continuing to parse the AST. This avoid showing spurious errors to the user (e.g. showing 'missing field' errors when the struct definition contains errors). region   | Another term for "lifetime" often used in the literature and in the borrow checker. rib   | A data structure in the name resolver that keeps track of a single scope for names. ([see more](../name-resolution.md)) +RPIT   | A return-position `impl Trait`. ([see the reference](https://doc.rust-lang.org/reference/types/impl-trait.html#abstract-return-types)). +RPITIT   | A return-position `impl Trait` *in trait*. Unlike RPIT, this is desugared to a generic associated type (GAT). Introduced in [RFC 3425](https://rust-lang.github.io/rfcs/3425-return-position-impl-trait-in-traits.html). ([see more](../return-position-impl-trait-in-trait.md)) scrutinee   | A scrutinee is the expression that is matched on in `match` expressions and similar pattern matching constructs. For example, in `match x { A => 1, B => 2 }`, the expression `x` is the scrutinee. sess   | The compiler session, which stores global data used throughout compilation side tables   | Because the AST and HIR are immutable once created, we often carry extra information about them in the form of hashtables, indexed by the id of a particular node. @@ -76,6 +79,7 @@ Term | Meaning substs   | The substitutions for a given generic type or item (e.g. the `i32`, `u32` in `HashMap`). sysroot   | The directory for build artifacts that are loaded by the compiler at runtime. ([see more](../building/bootstrapping.html#what-is-a-sysroot)) tag   | The "tag" of an enum/generator encodes the [discriminant](#discriminant) of the active variant/state. Tags can either be "direct" (simply storing the discriminant in a field) or use a ["niche"](#niche). +TAIT   | A type-alias `impl Trait`. Introduced in [RFC 2515](https://rust-lang.github.io/rfcs/2515-type_alias_impl_trait.html). `tcx`   | Standard variable name for the "typing context" (`TyCtxt`), main data structure of the compiler. ([see more](../ty.md)) `'tcx`   | The lifetime of the allocation arenas used by `TyCtxt`. Most data interned during a compilation session will use this lifetime with the exception of HIR data which uses the `'hir` lifetime. ([see more](../ty.md)) token   | The smallest unit of parsing. Tokens are produced after lexing ([see more](../the-parser.md)).