diff options
| author | Eduardo Broto <ebroto@tutanota.com> | 2020-10-23 22:16:59 +0200 |
|---|---|---|
| committer | Eduardo Broto <ebroto@tutanota.com> | 2020-10-23 22:16:59 +0200 |
| commit | cdb555f4fcdb57741ffb59bd2b0e66af69ea0a85 (patch) | |
| tree | 5c9c37427427a7d7b95dc090c560f006a9b92efe /doc/common_tools_writing_lints.md | |
| parent | fcde7683fe7ca10c83e5bc17f0969d2284affcd2 (diff) | |
Merge commit 'bf1c6f9871f430e284b17aa44059e0d0395e28a6' into clippyup
Diffstat (limited to 'doc/common_tools_writing_lints.md')
| -rw-r--r-- | doc/common_tools_writing_lints.md | 12 |
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 |
