Skip to content

Commit 058e955

Browse files
committed
Add toc markers
1 parent ca00b13 commit 058e955

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+122
-29
lines changed

src/backend/backend-agnostic.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Backend Agnostic Codegen
22

3+
<!-- toc -->
4+
35
As of January 2021, `rustc_codegen_ssa` provides an abstract interface for all backends to
46
implement, to allow other codegen backends (e.g. [Cranelift]).
57

src/backend/implicit-caller-location.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Implicit Caller Location
22

3+
<!-- toc -->
4+
35
Approved in [RFC 2091], this feature enables the accurate reporting of caller location during panics
46
initiated from functions like `Option::unwrap`, `Result::expect`, and `Index::index`. This feature
57
adds the [`#[track_caller]`][attr-reference] attribute for functions, the

src/backend/monomorph.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Monomorphization
22

3+
<!-- toc -->
4+
35
As you probably know, rust has a very expressive type system that has extensive
46
support for generic types. But of course, assembly is not generic, so we need
57
to figure out the concrete types of all the generics before the code can

src/backend/updating-llvm.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Updating LLVM
22

3+
<!-- toc -->
4+
35
The Rust compiler uses LLVM as its primary codegen backend today, and naturally
46
we want to at least occasionally update this dependency! Currently we do not
57
have a strict policy about when to update LLVM or what it can be updated to, but

src/borrow_check/moves_and_initialization/move_paths.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Move paths
22

3+
<!-- toc -->
4+
35
In reality, it's not enough to track initialization at the granularity
46
of local variables. Rust also allows us to do moves and initialization
57
at the field granularity:

src/borrow_check/region_inference.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Region inference (NLL)
22

3+
<!-- toc -->
4+
35
The MIR-based region checking code is located in [the `rustc_mir::borrow_check`
46
module][nll].
57

src/borrow_check/region_inference/constraint_propagation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Constraint propagation
22

3+
<!-- toc -->
4+
35
The main work of the region inference is **constraint propagation**,
46
which is done in the [`propagate_constraints`] function. There are
57
three sorts of constraints that are used in NLL, and we'll explain how

src/borrow_check/region_inference/lifetime_parameters.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Universal regions
22

3+
<!-- toc -->
4+
35
"Universal regions" is the name that the code uses to refer to "named
46
lifetimes" -- e.g., lifetime parameters and `'static`. The name
57
derives from the fact that such lifetimes are "universally quantified"

src/borrow_check/region_inference/member_constraints.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Member constraints
22

3+
<!-- toc -->
4+
35
A member constraint `'m member of ['c_1..'c_N]` expresses that the
46
region `'m` must be *equal* to some **choice regions** `'c_i` (for
57
some `i`). These constraints cannot be expressed by users, but they

src/borrow_check/region_inference/placeholders_and_universes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Placeholders and universes
22

3+
<!-- toc -->
4+
35
From time to time we have to reason about regions that we can't
46
concretely know. For example, consider this program:
57

0 commit comments

Comments
 (0)