File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
compiler/rustc_typeck/src Expand file tree Collapse file tree 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
5252variables, are stored directly into the `tcx` typeck_results.
5353
5454N.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
5757function `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
5959substituted for a fresh type variable `N`. This variable will
6060eventually be resolved to some concrete type (which might itself be
61- type parameter).
61+ a type parameter).
6262
6363*/
6464
Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ The type checker is responsible for:
771. Determining the type of each expression.
882. Resolving methods and traits.
993. 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
1313several major phases:
1414
15151. 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
3030The type checker is defined into various submodules which are documented
3131independently:
You can’t perform that action at this time.
0 commit comments