From e154e2684d29b0946e3a5e2ba1bf541aee9caed4 Mon Sep 17 00:00:00 2001 From: mark Date: Sat, 4 Apr 2020 13:04:36 -0500 Subject: [PATCH] add a note on tcx name --- src/overview.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/overview.md b/src/overview.md index 3bd60904..d92142e3 100644 --- a/src/overview.md +++ b/src/overview.md @@ -222,7 +222,10 @@ LLVM-IR are query-fied. That is, lexing and parsing are done all at once for the whole program. One other thing to mention here is the all-important "typing context", -[`TyCtxt`], which is a giant struct that is at the center of all things. All +[`TyCtxt`], which is a giant struct that is at the center of all things. +(Note that the name is mostly historic. This is _not_ a "typing context" in the +sense of `Γ` or `Δ` from type theory. The name is retained because that's what +the name of the struct is in the source code.) All queries are defined as methods on the [`TyCtxt`] type, and the in-memory query cache is stored there too. In the code, there is usually a variable called `tcx` which is a handle on the typing context. You will also see lifetimes with