about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-10-09 12:41:08 +0000
committerbors <bors@rust-lang.org>2020-10-09 12:41:08 +0000
commite87c028a2ac93e95d807c1c44da5cbbf383502dd (patch)
treecd366f0de9f47481ea9412e6965d0e854a90684a
parentcad10fa3b35a3b09c686579a8ef9f8e55d6cea20 (diff)
parent326090dbb8285e9486d77fd9aa2ea206f78bf978 (diff)
downloadrust-e87c028a2ac93e95d807c1c44da5cbbf383502dd.tar.gz
rust-e87c028a2ac93e95d807c1c44da5cbbf383502dd.zip
Auto merge of #6131 - Ambroisie:fix-doc-tools, r=flip1995
Rename tables to typecheck_result()

While working on #6130, I noticed that part of the documentation was updated to use `LateContext::typeck_results`, but the paragraph still referred to the old `tables` field of `LateContext`.

---

*Please keep the line below*
changelog: none
-rw-r--r--doc/common_tools_writing_lints.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/common_tools_writing_lints.md b/doc/common_tools_writing_lints.md
index 53c3d084dbc..d56079a4ab7 100644
--- a/doc/common_tools_writing_lints.md
+++ b/doc/common_tools_writing_lints.md
@@ -45,11 +45,13 @@ Similarly in [`TypeckResults`][TypeckResults] methods, you have the [`pat_ty()`]
 to retrieve a type from a pattern.
 
 Two noticeable items here:
-- `cx` is the lint context [`LateContext`][LateContext].
-  The two most useful data structures in this context are `tcx` and `tables`,
-  allowing us to jump to type definitions and other compilation stages such as HIR.
-- `tables` is [`TypeckResults`][TypeckResults] and is created by type checking step,
-  it includes useful information such as types of expressions, ways to resolve methods and so on.
+- `cx` is the lint context [`LateContext`][LateContext]. The two most useful
+  data structures in this context are `tcx` and the `TypeckResults` returned by
+  `LateContext::typeck_results`, allowing us to jump to type definitions and
+  other compilation stages such as HIR.
+- `typeck_results`'s return value is [`TypeckResults`][TypeckResults] and is
+  created by type checking step, it includes useful information such as types
+  of expressions, ways to resolve methods and so on.
 
 # Checking if an expr is calling a specific method