File tree 2 files changed +7
-7
lines changed
compiler/rustc_typeck/src 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -52,13 +52,13 @@ The types of top-level items, which never contain unbound type
52
52
variables, are stored directly into the `tcx` typeck_results.
53
53
54
54
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
57
57
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
59
59
substituted for a fresh type variable `N`. This variable will
60
60
eventually be resolved to some concrete type (which might itself be
61
- type parameter).
61
+ a type parameter).
62
62
63
63
*/
64
64
Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ The type checker is responsible for:
7
7
1. Determining the type of each expression.
8
8
2. Resolving methods and traits.
9
9
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. )
11
11
12
- The main entry point is `check_crate()`. Type checking operates in
12
+ The main entry point is [ `check_crate()`] . Type checking operates in
13
13
several major phases:
14
14
15
15
1. The collect phase first passes over all items and determines their
@@ -25,7 +25,7 @@ several major phases:
25
25
containing function). Inference is used to supply types wherever
26
26
they are unknown. The actual checking of a function itself has
27
27
several phases (check, regionck, writeback), as discussed in the
28
- documentation for the `check` module.
28
+ documentation for the [ `check`] module.
29
29
30
30
The type checker is defined into various submodules which are documented
31
31
independently:
You can’t perform that action at this time.
0 commit comments