Skip to content

Commit

Permalink
Auto merge of #6131 - Ambroisie:fix-doc-tools, r=flip1995
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Oct 9, 2020
2 parents cad10fa + 326090d commit e87c028
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions doc/common_tools_writing_lints.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e87c028

Please sign in to comment.