Skip to content

Commit e87c028

Browse files
committed
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
2 parents cad10fa + 326090d commit e87c028

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

doc/common_tools_writing_lints.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,13 @@ Similarly in [`TypeckResults`][TypeckResults] methods, you have the [`pat_ty()`]
4545
to retrieve a type from a pattern.
4646

4747
Two noticeable items here:
48-
- `cx` is the lint context [`LateContext`][LateContext].
49-
The two most useful data structures in this context are `tcx` and `tables`,
50-
allowing us to jump to type definitions and other compilation stages such as HIR.
51-
- `tables` is [`TypeckResults`][TypeckResults] and is created by type checking step,
52-
it includes useful information such as types of expressions, ways to resolve methods and so on.
48+
- `cx` is the lint context [`LateContext`][LateContext]. The two most useful
49+
data structures in this context are `tcx` and the `TypeckResults` returned by
50+
`LateContext::typeck_results`, allowing us to jump to type definitions and
51+
other compilation stages such as HIR.
52+
- `typeck_results`'s return value is [`TypeckResults`][TypeckResults] and is
53+
created by type checking step, it includes useful information such as types
54+
of expressions, ways to resolve methods and so on.
5355

5456
# Checking if an expr is calling a specific method
5557

0 commit comments

Comments
 (0)