Skip to content

Commit 6234aed

Browse files
committed
opaque_types: various nits
1 parent 6cab003 commit 6234aed

File tree

1 file changed

+10
-10
lines changed
  • src/librustc/infer/opaque_types

1 file changed

+10
-10
lines changed

src/librustc/infer/opaque_types/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub struct OpaqueTypeDecl<'tcx> {
4141
/// ```
4242
/// existential type Foo;
4343
/// fn bar() -> Foo {
44-
/// ^^^ this is the span we are looking for!
44+
/// ^^^ This is the span we are looking for!
4545
/// ```
4646
///
4747
/// In cases where the fn returns `(impl Trait, impl Trait)` or
@@ -234,13 +234,13 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
234234
///
235235
/// # The Solution
236236
///
237-
/// We generally prefer to make us our `<=` constraints, since
238-
/// they integrate best into the region solve. To do that, we find
239-
/// the "minimum" of all the arguments that appear in the substs:
240-
/// that is, some region which is less than all the others. In the
241-
/// case of `Foo1<'a>`, that would be `'a` (it's the only choice,
242-
/// after all). Then we apply that as a least bound to the
243-
/// variables (e.g., `'a <= '0`).
237+
/// We generally prefer to make `<=` constraints, since they
238+
/// integrate best into the region solver. To do that, we find the
239+
/// "minimum" of all the arguments that appear in the substs: that
240+
/// is, some region which is less than all the others. In the case
241+
/// of `Foo1<'a>`, that would be `'a` (it's the only choice, after
242+
/// all). Then we apply that as a least bound to the variables
243+
/// (e.g., `'a <= '0`).
244244
///
245245
/// In some cases, there is no minimum. Consider this example:
246246
///
@@ -316,7 +316,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
316316
}
317317
}
318318

319-
/// See `constrain_opaque_types` for docs
319+
/// See `constrain_opaque_types` for documentation.
320320
pub fn constrain_opaque_type<FRR: FreeRegionRelations<'tcx>>(
321321
&self,
322322
def_id: DefId,
@@ -417,7 +417,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
417417
}
418418

419419
/// As a fallback, we sometimes generate an "in constraint". For
420-
/// case like `impl Foo<'a, 'b>`, where `'a` and `'b` cannot be
420+
/// a case like `impl Foo<'a, 'b>`, where `'a` and `'b` cannot be
421421
/// related, we would generate a constraint `'r in ['a, 'b,
422422
/// 'static]` for each region `'r` that appears in the hidden type
423423
/// (i.e., it must be equal to `'a`, `'b`, or `'static`).

0 commit comments

Comments
 (0)