Skip to content

Commit 33cd862

Browse files
Rollup merge of #81547 - pierwill:edit-typeck-mod-docs, r=davidtwco
Edit rustc_typeck top-level docs Edit punctuation and wording in note on type variables vs. type parameters. Also add missing punctuation and two inter-doc links.
2 parents c74f004 + adfb04f commit 33cd862

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

compiler/rustc_typeck/src/check/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ The types of top-level items, which never contain unbound type
5252
variables, are stored directly into the `tcx` typeck_results.
5353
5454
N.B., a type variable is not the same thing as a type parameter. A
55-
type variable is rather an "instance" of a type parameter: that is,
56-
given a generic function `fn foo<T>(t: T)`: while checking the
55+
type variable is an instance of a type parameter. That is,
56+
given a generic function `fn foo<T>(t: T)`, while checking the
5757
function `foo`, the type `ty_param(0)` refers to the type `T`, which
58-
is treated in abstract. When `foo()` is called, however, `T` will be
58+
is treated in abstract. However, when `foo()` is called, `T` will be
5959
substituted for a fresh type variable `N`. This variable will
6060
eventually be resolved to some concrete type (which might itself be
61-
type parameter).
61+
a type parameter).
6262
6363
*/
6464

compiler/rustc_typeck/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ The type checker is responsible for:
77
1. Determining the type of each expression.
88
2. Resolving methods and traits.
99
3. Guaranteeing that most type rules are met. ("Most?", you say, "why most?"
10-
Well, dear reader, read on)
10+
Well, dear reader, read on.)
1111
12-
The main entry point is `check_crate()`. Type checking operates in
12+
The main entry point is [`check_crate()`]. Type checking operates in
1313
several major phases:
1414
1515
1. The collect phase first passes over all items and determines their
@@ -25,7 +25,7 @@ several major phases:
2525
containing function). Inference is used to supply types wherever
2626
they are unknown. The actual checking of a function itself has
2727
several phases (check, regionck, writeback), as discussed in the
28-
documentation for the `check` module.
28+
documentation for the [`check`] module.
2929
3030
The type checker is defined into various submodules which are documented
3131
independently:

0 commit comments

Comments
 (0)