From 863dcfbd2aab8cae2f6710147b500835be542a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Le=C3=B3n=20Orell=20Valerian=20Liehr?= Date: Sat, 22 Aug 2026 17:29:28 +0200 Subject: [PATCH] Rename LTA to CTA --- src/appendix/glossary.md | 5 +++-- src/traits/implied-bounds.md | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/appendix/glossary.md b/src/appendix/glossary.md index e8f22bdf2f..18ddf069fd 100644 --- a/src/appendix/glossary.md +++ b/src/appendix/glossary.md @@ -18,6 +18,7 @@ Term | Meaning codegen unit | When we produce LLVM IR, we group the Rust code into a number of codegen units (sometimes abbreviated as CGUs). Each of these units is processed by LLVM independently from one another, enabling parallelism. They are also the unit of incremental re-use. ([see more](../backend/codegen.md)) completeness | A technical term in type theory, it means that every type-safe program also type-checks. Having both soundness and completeness is very hard, and usually soundness is more important. (see "soundness"). control-flow graph, CFG | A representation of the control-flow of a program; see [the background chapter for more](./background.md#cfg) +CTA | A _checked type alias_, a type alias that gets "properly" represented as an alias in the [middle ty IR](#middle-ty-ir); contrary to (unchecked) type aliases whose reference sites get expanded to the underlying aliased type (the RHS of the type alias after instantiation) during HIR ty lowering, its reference sites get [lowered](#lowering) to an [`AliasTy`]. CTFE | Short for _compile-time function evaluation_, this is the ability of the compiler to evaluate `const fn`s at compile time. This is part of the compiler's constant evaluation system. ([see more](../const-eval.md)) `cx` | We tend to use _cx_ as an abbreviation for _context_. See also `tcx`, `infcx`, etc. `ctxt` | We also use _ctxt_ as an abbreviation for _context_, e.g. [`TyCtxt`](#TyCtxt). See also [cx](#cx) or [tcx](#tcx). @@ -57,7 +58,7 @@ Term | Meaning late-bound lifetime | A lifetime / region that is substituted at its call site. Bound in a HRTB and substituted by specific functions in the compiler, such as `liberate_late_bound_regions`. Contrast with **early-bound lifetime**. ([see more](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/region_kind/enum.RegionKind.html#bound-regions)) local crate | The crate currently being compiled. This is in contrast to "upstream crates" which refer to dependencies of the local crate. lowering | The act of converting a higher-level [IR](#ir) to a lower-level one. E.g., AST lowering (from [AST](#ast) to [HIR](#hir)) or HIR ty lowering (from HIR to [middle ty IR](#middle-ty-ir)). -LTA | A _lazy type alias_, a type alias that gets "properly" represented as an alias in the [middle ty IR](#middle-ty-ir); contrary to (eager) type aliases whose reference sites get expanded to the underlying aliased type (the RHS of the type alias after instantiation) during HIR ty lowering, its reference sites get [lowered](#lowering) to an [`AliasTy`]. +LTA 👎 | Short for _lazy type alias_. **Renamed to [CTA](#cta)**. LTO | Short for *link-time optimizations*, this is a set of optimizations offered by LLVM that occur just before the final binary is linked. These include optimizations like removing functions that are never used in the final program, for example. _ThinLTO_ is a variant of LTO that aims to be a bit more scalable and efficient, but possibly sacrifices some optimizations. You may also read issues in the Rust repo about "FatLTO", which is the loving nickname given to non-Thin LTO. LLVM documentation: [here][lto] and [here][thinlto]. [LLVM] | (actually not an acronym :P) an open-source compiler backend. It accepts LLVM IR and outputs native binaries. Various languages (e.g. Rust) can then implement a compiler front-end that outputs LLVM IR and use LLVM to compile to all the platforms LLVM supports. memoization | The process of storing the results of (pure) computations (such as pure function calls) to avoid having to repeat them in the future. This is typically a trade-off between execution speed and memory usage. @@ -120,7 +121,7 @@ See also . [RFC 2515]: https://rust-lang.github.io/rfcs/2515-type_alias_impl_trait.html [RFC 3425]: https://rust-lang.github.io/rfcs/3425-return-position-impl-trait-in-traits.html [TLS]: https://llvm.org/docs/LangRef.html#thread-local-storage-models -[`AliasTy`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/type.AliasTy.html +[`AliasTy`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/sty/type.AliasTy.html [`Span`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_span/struct.Span.html [`generic_const_items`]: https://github.com/rust-lang/rust/issues/113521 [`min_generic_const_items`]: https://github.com/rust-lang/rust/issues/132980 diff --git a/src/traits/implied-bounds.md b/src/traits/implied-bounds.md index 3b4072394e..1a2e9b225c 100644 --- a/src/traits/implied-bounds.md +++ b/src/traits/implied-bounds.md @@ -10,7 +10,7 @@ while implicit ones are handled, well... implicitly. ## explicit implied bounds The explicit implied bounds are computed in [`fn inferred_outlives_of`]. -Only ADTs and lazy type aliases have explicit implied bounds +Only ADTs and [CTAs](../appendix/glossary.md#cta) have explicit implied bounds which are computed via a fixpoint algorithm in the [`fn inferred_outlives_crate`] query. We use [`fn insert_required_clauses_to_be_wf`] on all fields of all ADTs in the crate.