Spellchecking compiler comments

This PR cleans up the rest of the spelling mistakes in the compiler comments. This PR does not change any literal or code spelling issues.
This commit is contained in:
Yuri Astrakhan 2022-03-30 15:14:15 -04:00
parent 3e7514670d
commit 5160f8f843
116 changed files with 171 additions and 171 deletions

View file

@ -2,7 +2,7 @@
//! in particular to extract out the resulting region obligations and
//! encode them therein.
//!
//! For an overview of what canonicaliation is and how it fits into
//! For an overview of what canonicalization is and how it fits into
//! rustc, check out the [chapter in the rustc dev guide][c].
//!
//! [c]: https://rust-lang.github.io/chalk/book/canonical_queries/canonicalization.html

View file

@ -1164,7 +1164,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
let len = sub1.len() - common_default_params;
let consts_offset = len - sub1.consts().count();
// Only draw `<...>` if there're lifetime/type arguments.
// Only draw `<...>` if there are lifetime/type arguments.
if len > 0 {
values.0.push_normal("<");
values.1.push_normal("<");
@ -1245,7 +1245,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
}
// Close the type argument bracket.
// Only draw `<...>` if there're lifetime/type arguments.
// Only draw `<...>` if there are lifetime/type arguments.
if len > 0 {
values.0.push_normal(">");
values.1.push_normal(">");
@ -1857,7 +1857,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
})
.transpose();
if output.is_some() {
// We don't account for multiple `Future::Output = Ty` contraints.
// We don't account for multiple `Future::Output = Ty` constraints.
return output;
}
}

View file

@ -83,7 +83,7 @@ where
// But if we did in reverse order, we would create a `v <:
// LHS` (or vice versa) constraint and then instantiate
// `v`. This would require further processing to achieve same
// end-result; in partiular, this screws up some of the logic
// end-result; in particular, this screws up some of the logic
// in coercion, which expects LUB to figure out that the LHS
// is (e.g.) `Box<i32>`. A more obvious solution might be to
// iterate on the subtype obligations that are returned, but I

View file

@ -343,7 +343,7 @@ pub struct InferCtxt<'a, 'tcx> {
/// Track how many errors were reported when this infcx is created.
/// If the number of errors increases, that's also a sign (line
/// `tained_by_errors`) to avoid reporting certain kinds of errors.
/// `tainted_by_errors`) to avoid reporting certain kinds of errors.
// FIXME(matthewjasper) Merge into `tainted_by_errors_flag`
err_count_on_creation: usize,

View file

@ -550,7 +550,7 @@ where
}
if a == b {
// Subtle: if a or b has a bound variable that we are lazilly
// Subtle: if a or b has a bound variable that we are lazily
// substituting, then even if a == b, it could be that the values we
// will substitute for those bound variables are *not* the same, and
// hence returning `Ok(a)` is incorrect.

View file

@ -306,7 +306,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
/// # Constrain regions, not the hidden concrete type
///
/// Note that generating constraints on each region `Rc` is *not*
/// the same as generating an outlives constraint on `Tc` iself.
/// the same as generating an outlives constraint on `Tc` itself.
/// For example, if we had a function like this:
///
/// ```rust

View file

@ -125,7 +125,7 @@ fn compute_components<'tcx>(
// regionck more ways to prove that it holds. However,
// regionck is not (at least currently) prepared to deal with
// higher-ranked regions that may appear in the
// trait-ref. Therefore, if we see any higher-ranke regions,
// trait-ref. Therefore, if we see any higher-rank regions,
// we simply fallback to the most restrictive rule, which
// requires that `Pi: 'a` for all `i`.
ty::Projection(ref data) => {

View file

@ -93,7 +93,7 @@ impl<'a, 'tcx> OutlivesEnvironment<'tcx> {
&self.region_bound_pairs_map
}
/// This is a hack to support the old-skool regionck, which
/// This is a hack to support the old-school regionck, which
/// processes region constraints from the main function and the
/// closure together. In that context, when we enter a closure, we
/// want to be able to "save" the state of the surrounding a

View file

@ -365,7 +365,7 @@ where
debug!("projection_must_outlive: approx_env_bounds={:?}", approx_env_bounds);
// Remove outlives bounds that we get from the environment but
// which are also deducable from the trait. This arises (cc
// which are also deducible from the trait. This arises (cc
// #55756) in cases where you have e.g., `<T as Foo<'a>>::Item:
// 'a` in the environment but `trait Foo<'b> { type Item: 'b
// }` in the trait definition.

View file

@ -33,7 +33,7 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
/// not entirely true. In particular, in the future, we may extend the
/// environment with implied bounds or other info about how placeholders
/// relate to regions in outer universes. In that case, `P1: R` for example
/// might become solveable.
/// might become solvable.
///
/// # Summary of the implementation
///
@ -210,7 +210,7 @@ impl<'me, 'tcx> LeakCheck<'me, 'tcx> {
// * `scc_placeholder[scc1]` stores the placeholder that `scc1` must
// be equal to (if any)
//
// For each succssor `scc2` where `scc1: scc2`:
// For each successor `scc2` where `scc1: scc2`:
//
// * `scc_placeholder[scc2]` stores some placeholder `P` where
// `scc2: P` (if any)
@ -243,7 +243,7 @@ impl<'me, 'tcx> LeakCheck<'me, 'tcx> {
// Update minimum universe of scc1.
self.scc_universes[scc1] = scc1_universe;
// At this point, `scc_placholder[scc1]` stores the placeholder that
// At this point, `scc_placeholder[scc1]` stores the placeholder that
// `scc1` must be equal to, if any.
if let Some(scc1_placeholder) = self.scc_placeholders[scc1] {
debug!(

View file

@ -46,7 +46,7 @@ pub struct RegionConstraintStorage<'tcx> {
/// exist). This prevents us from making many such regions.
glbs: CombineMap<'tcx>,
/// When we add a R1 == R2 constriant, we currently add (a) edges
/// When we add a R1 == R2 constraint, we currently add (a) edges
/// R1 <= R2 and R2 <= R1 and (b) we unify the two regions in this
/// table. You can then call `opportunistic_resolve_var` early
/// which will map R1 and R2 to some common region (i.e., either

View file

@ -55,7 +55,7 @@ impl<'a, 'tcx> TypeFolder<'tcx> for OpportunisticVarResolver<'a, 'tcx> {
/// The opportunistic region resolver opportunistically resolves regions
/// variables to the variable with the least variable id. It is used when
/// normlizing projections to avoid hitting the recursion limit by creating
/// normalizing projections to avoid hitting the recursion limit by creating
/// many versions of a predicate for types that in the end have to unify.
///
/// If you want to resolve type and const variables as well, call