Remove double spaces after dots in comments
This commit is contained in:
parent
279f1c9d8c
commit
6a28fb42a8
157 changed files with 313 additions and 313 deletions
|
@ -136,7 +136,7 @@ pub(super) fn compare_impl_method<'tcx>(
|
|||
/// <'a> fn(t: &'i0 U0, m: &'a) -> Foo
|
||||
///
|
||||
/// This type is also the same but the name of the bound region (`'a`
|
||||
/// vs `'b`). However, the normal subtyping rules on fn types handle
|
||||
/// vs `'b`). However, the normal subtyping rules on fn types handle
|
||||
/// this kind of equivalency just fine.
|
||||
///
|
||||
/// We now use these substitutions to ensure that all declared bounds are
|
||||
|
@ -625,7 +625,7 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
|
|||
match infcx.fully_resolve(ty) {
|
||||
Ok(ty) => {
|
||||
// `ty` contains free regions that we created earlier while liberating the
|
||||
// trait fn signature. However, projection normalization expects `ty` to
|
||||
// trait fn signature. However, projection normalization expects `ty` to
|
||||
// contains `def_id`'s early-bound regions.
|
||||
let id_substs = InternalSubsts::identity_for_item(tcx, def_id);
|
||||
debug!(?id_substs, ?substs);
|
||||
|
@ -883,7 +883,7 @@ fn check_region_bounds_on_impl_item<'tcx>(
|
|||
|
||||
// Must have same number of early-bound lifetime parameters.
|
||||
// Unfortunately, if the user screws up the bounds, then this
|
||||
// will change classification between early and late. E.g.,
|
||||
// will change classification between early and late. E.g.,
|
||||
// if in trait we have `<'a,'b:'a>`, and in impl we just have
|
||||
// `<'a,'b>`, then we have 2 early-bound lifetime parameters
|
||||
// in trait but 0 in the impl. But if we report "expected 2
|
||||
|
@ -994,9 +994,9 @@ fn compare_self_type<'tcx>(
|
|||
impl_trait_ref: ty::TraitRef<'tcx>,
|
||||
) -> Result<(), ErrorGuaranteed> {
|
||||
// Try to give more informative error messages about self typing
|
||||
// mismatches. Note that any mismatch will also be detected
|
||||
// mismatches. Note that any mismatch will also be detected
|
||||
// below, where we construct a canonical function type that
|
||||
// includes the self parameter as a normal parameter. It's just
|
||||
// includes the self parameter as a normal parameter. It's just
|
||||
// that the error messages you get out of this code are a bit more
|
||||
// inscrutable, particularly for cases where one method has no
|
||||
// self.
|
||||
|
|
|
@ -46,7 +46,7 @@ pub fn check_drop_impl(tcx: TyCtxt<'_>, drop_impl_did: DefId) -> Result<(), Erro
|
|||
)
|
||||
}
|
||||
_ => {
|
||||
// Destructors only work on nominal types. This was
|
||||
// Destructors only work on nominal types. This was
|
||||
// already checked by coherence, but compilation may
|
||||
// not have been terminated.
|
||||
let span = tcx.def_span(drop_impl_did);
|
||||
|
|
|
@ -14,23 +14,23 @@ can be broken down into several distinct phases:
|
|||
|
||||
- main: the main pass does the lion's share of the work: it
|
||||
determines the types of all expressions, resolves
|
||||
methods, checks for most invalid conditions, and so forth. In
|
||||
methods, checks for most invalid conditions, and so forth. In
|
||||
some cases, where a type is unknown, it may create a type or region
|
||||
variable and use that as the type of an expression.
|
||||
|
||||
In the process of checking, various constraints will be placed on
|
||||
these type variables through the subtyping relationships requested
|
||||
through the `demand` module. The `infer` module is in charge
|
||||
through the `demand` module. The `infer` module is in charge
|
||||
of resolving those constraints.
|
||||
|
||||
- regionck: after main is complete, the regionck pass goes over all
|
||||
types looking for regions and making sure that they did not escape
|
||||
into places where they are not in scope. This may also influence the
|
||||
into places where they are not in scope. This may also influence the
|
||||
final assignments of the various region variables if there is some
|
||||
flexibility.
|
||||
|
||||
- writeback: writes the final types within a function body, replacing
|
||||
type variables with their final inferred types. These final types
|
||||
type variables with their final inferred types. These final types
|
||||
are written into the `tcx.node_types` table, which should *never* contain
|
||||
any reference to a type variable.
|
||||
|
||||
|
@ -38,8 +38,8 @@ can be broken down into several distinct phases:
|
|||
|
||||
While type checking a function, the intermediate types for the
|
||||
expressions, blocks, and so forth contained within the function are
|
||||
stored in `fcx.node_types` and `fcx.node_substs`. These types
|
||||
may contain unresolved type variables. After type checking is
|
||||
stored in `fcx.node_types` and `fcx.node_substs`. These types
|
||||
may contain unresolved type variables. After type checking is
|
||||
complete, the functions in the writeback module are used to take the
|
||||
types from this table, resolve them, and then write them into their
|
||||
permanent home in the type context `tcx`.
|
||||
|
@ -51,12 +51,12 @@ nodes within the function.
|
|||
The types of top-level items, which never contain unbound type
|
||||
variables, are stored directly into the `tcx` typeck_results.
|
||||
|
||||
N.B., a type variable is not the same thing as a type parameter. A
|
||||
N.B., a type variable is not the same thing as a type parameter. A
|
||||
type variable is an instance of a type parameter. That is,
|
||||
given a generic function `fn foo<T>(t: T)`, while checking the
|
||||
function `foo`, the type `ty_param(0)` refers to the type `T`, which
|
||||
is treated in abstract. However, when `foo()` is called, `T` will be
|
||||
substituted for a fresh type variable `N`. This variable will
|
||||
substituted for a fresh type variable `N`. This variable will
|
||||
eventually be resolved to some concrete type (which might itself be
|
||||
a type parameter).
|
||||
|
||||
|
@ -441,7 +441,7 @@ fn suggestion_signature(assoc: &ty::AssocItem, tcx: TyCtxt<'_>) -> String {
|
|||
ty::AssocKind::Fn => {
|
||||
// We skip the binder here because the binder would deanonymize all
|
||||
// late-bound regions, and we don't want method signatures to show up
|
||||
// `as for<'r> fn(&'r MyType)`. Pretty-printing handles late-bound
|
||||
// `as for<'r> fn(&'r MyType)`. Pretty-printing handles late-bound
|
||||
// regions just fine, showing `fn(&MyType)`.
|
||||
fn_sig_suggestion(
|
||||
tcx,
|
||||
|
|
|
@ -325,7 +325,7 @@ fn resolve_expr<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, expr: &'tcx h
|
|||
// The idea is that call.callee_id represents *the time when
|
||||
// the invoked function is actually running* and call.id
|
||||
// represents *the time to prepare the arguments and make the
|
||||
// call*. See the section "Borrows in Calls" borrowck/README.md
|
||||
// call*. See the section "Borrows in Calls" borrowck/README.md
|
||||
// for an extended explanation of why this distinction is
|
||||
// important.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue