diff options
Diffstat (limited to 'compiler/rustc_infer')
12 files changed, 16 insertions, 16 deletions
diff --git a/compiler/rustc_infer/src/infer/canonical/query_response.rs b/compiler/rustc_infer/src/infer/canonical/query_response.rs index 750643acdda..5671711397a 100644 --- a/compiler/rustc_infer/src/infer/canonical/query_response.rs +++ b/compiler/rustc_infer/src/infer/canonical/query_response.rs @@ -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 diff --git a/compiler/rustc_infer/src/infer/error_reporting/mod.rs b/compiler/rustc_infer/src/infer/error_reporting/mod.rs index 6e007b181f2..9b2fc07e9cb 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/mod.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/mod.rs @@ -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; } } diff --git a/compiler/rustc_infer/src/infer/lattice.rs b/compiler/rustc_infer/src/infer/lattice.rs index b77245c2592..1e3293efad6 100644 --- a/compiler/rustc_infer/src/infer/lattice.rs +++ b/compiler/rustc_infer/src/infer/lattice.rs @@ -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 diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs index 63ffb5bde38..a9b4451e77b 100644 --- a/compiler/rustc_infer/src/infer/mod.rs +++ b/compiler/rustc_infer/src/infer/mod.rs @@ -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, diff --git a/compiler/rustc_infer/src/infer/nll_relate/mod.rs b/compiler/rustc_infer/src/infer/nll_relate/mod.rs index cc0114d7538..94a795f613e 100644 --- a/compiler/rustc_infer/src/infer/nll_relate/mod.rs +++ b/compiler/rustc_infer/src/infer/nll_relate/mod.rs @@ -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. diff --git a/compiler/rustc_infer/src/infer/opaque_types.rs b/compiler/rustc_infer/src/infer/opaque_types.rs index e8cd5988b96..78e6f3a05be 100644 --- a/compiler/rustc_infer/src/infer/opaque_types.rs +++ b/compiler/rustc_infer/src/infer/opaque_types.rs @@ -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 diff --git a/compiler/rustc_infer/src/infer/outlives/components.rs b/compiler/rustc_infer/src/infer/outlives/components.rs index fbf149a4788..291362a6180 100644 --- a/compiler/rustc_infer/src/infer/outlives/components.rs +++ b/compiler/rustc_infer/src/infer/outlives/components.rs @@ -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) => { diff --git a/compiler/rustc_infer/src/infer/outlives/env.rs b/compiler/rustc_infer/src/infer/outlives/env.rs index bd8bb9e1fa9..97e219ab61d 100644 --- a/compiler/rustc_infer/src/infer/outlives/env.rs +++ b/compiler/rustc_infer/src/infer/outlives/env.rs @@ -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 diff --git a/compiler/rustc_infer/src/infer/outlives/obligations.rs b/compiler/rustc_infer/src/infer/outlives/obligations.rs index 45aa2bcba86..e3312e6c6e1 100644 --- a/compiler/rustc_infer/src/infer/outlives/obligations.rs +++ b/compiler/rustc_infer/src/infer/outlives/obligations.rs @@ -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. diff --git a/compiler/rustc_infer/src/infer/region_constraints/leak_check.rs b/compiler/rustc_infer/src/infer/region_constraints/leak_check.rs index 817aaf10053..9ba52786259 100644 --- a/compiler/rustc_infer/src/infer/region_constraints/leak_check.rs +++ b/compiler/rustc_infer/src/infer/region_constraints/leak_check.rs @@ -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!( diff --git a/compiler/rustc_infer/src/infer/region_constraints/mod.rs b/compiler/rustc_infer/src/infer/region_constraints/mod.rs index 6966f501446..4ea1c3f76c8 100644 --- a/compiler/rustc_infer/src/infer/region_constraints/mod.rs +++ b/compiler/rustc_infer/src/infer/region_constraints/mod.rs @@ -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 diff --git a/compiler/rustc_infer/src/infer/resolve.rs b/compiler/rustc_infer/src/infer/resolve.rs index 08358bf5067..cf9345142af 100644 --- a/compiler/rustc_infer/src/infer/resolve.rs +++ b/compiler/rustc_infer/src/infer/resolve.rs @@ -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 |
