Skip to content

Commit ef33c5c

Browse files
committed
Typo fixes in comments.
1 parent a8c8c8a commit ef33c5c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/rustc/middle/region.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Regions are more complex than type parameters because, unlike type
5252
parameters, they can be universally quantified within a type. To put
5353
it another way, you cannot (at least at the time of this writing) have
5454
a variable `x` of type `fn<T>(T) -> T`. You can have an *item* of
55-
type `fn<T>(T) - T`, but whenever it is referenced within a method,
55+
type `fn<T>(T) -> T`, but whenever it is referenced within a method,
5656
that type parameter `T` is replaced with a concrete type *variable*
5757
`$T`. To make this more concrete, imagine this code:
5858
@@ -114,7 +114,7 @@ to `&a` would be `re_bound(rid_param("a", 0u))`, and the inner reference
114114
would be `re_free(rid_param("a", 0u))`. In `item2()`, the inner reference
115115
would be `re_bound(rid_param("a", 0u))`.
116116
117-
#### Impliciations for typeck
117+
#### Implications for typeck
118118
119119
In typeck, whenever we call a function, we must go over and replace
120120
all references to `re_bound()` regions within its parameters with

src/rustc/middle/typeck/infer.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1090,8 +1090,8 @@ impl assignment for infer_ctxt {
10901090
// ______________________________________________________________________
10911091
// Type combining
10921092
//
1093-
// There are three type combiners, sub, lub, and glb. Each implements
1094-
// the interface `combine` contains methods for combining two
1093+
// There are three type combiners: sub, lub, and glb. Each implements
1094+
// the interface `combine` and contains methods for combining two
10951095
// instances of various things and yielding a new instance. These
10961096
// combiner methods always yield a `result<T>`---failure is propagated
10971097
// upward using `chain()` methods.
@@ -1101,13 +1101,13 @@ impl assignment for infer_ctxt {
11011101
// instance as the first parameter. This would be better implemented
11021102
// using traits. For this system to work properly, you should not
11031103
// call the `super_X(foo, ...)` functions directly, but rather call
1104-
// `foo.X(...)`. The implemtation of `X()` can then choose to delegate
1104+
// `foo.X(...)`. The implementation of `X()` can then choose to delegate
11051105
// to the `super` routine or to do other things.
11061106
//
11071107
// In reality, the sub operation is rather different from lub/glb, but
11081108
// they are combined into one interface to avoid duplication (they
11091109
// used to be separate but there were many bugs because there were two
1110-
// copies of most routines.
1110+
// copies of most routines).
11111111
//
11121112
// The differences are:
11131113
//
@@ -1177,7 +1177,7 @@ fn super_substs<C:combine>(
11771177
(_, _) {
11781178
// If these two substitutions are for the same type (and
11791179
// they should be), then the type should either
1180-
// consistenly have a region parameter or not have a
1180+
// consistently have a region parameter or not have a
11811181
// region parameter.
11821182
infcx.tcx.sess.bug(
11831183
#fmt["substitution a had opt_region %s and \

0 commit comments

Comments
 (0)