Fix typos “a”→“an”
This commit is contained in:
parent
2ad56d5c90
commit
bf88b113ea
99 changed files with 157 additions and 157 deletions
|
@ -77,7 +77,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
/// ?0: Iterator<Item = ?1>
|
||||
/// ?1: Debug
|
||||
///
|
||||
/// Moreover, it returns a `OpaqueTypeMap` that would map `?0` to
|
||||
/// Moreover, it returns an `OpaqueTypeMap` that would map `?0` to
|
||||
/// info about the `impl Iterator<..>` type and `?1` to info about
|
||||
/// the `impl Debug` type.
|
||||
///
|
||||
|
@ -886,7 +886,7 @@ impl<'a, 'tcx> Instantiator<'a, 'tcx> {
|
|||
// }
|
||||
// ```
|
||||
//
|
||||
// Here, the return type of `foo` references a
|
||||
// Here, the return type of `foo` references an
|
||||
// `Opaque` indeed, but not one whose value is
|
||||
// presently being inferred. You can get into a
|
||||
// similar situation with closure return types
|
||||
|
|
|
@ -12,7 +12,7 @@ use rustc_errors::ErrorReported;
|
|||
use rustc_middle::ty::fold::TypeFoldable;
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
|
||||
/// Attempts to resolve an obligation to a `ImplSource`. The result is
|
||||
/// Attempts to resolve an obligation to an `ImplSource`. The result is
|
||||
/// a shallow `ImplSource` resolution, meaning that we do not
|
||||
/// (necessarily) resolve all nested obligations on the impl. Note
|
||||
/// that type check should guarantee to us that all nested
|
||||
|
|
|
@ -2009,7 +2009,7 @@ pub enum ArgKind {
|
|||
Arg(String, String),
|
||||
|
||||
/// An argument of tuple type. For a "found" argument, the span is
|
||||
/// the location in the source of the pattern. For a "expected"
|
||||
/// the location in the source of the pattern. For an "expected"
|
||||
/// argument, it will be None. The vector is a list of (name, ty)
|
||||
/// strings for the components of the tuple.
|
||||
Tuple(Option<Span>, Vec<(String, String)>),
|
||||
|
|
|
@ -1365,7 +1365,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
// When a future does not implement a trait because of a captured type in one of the
|
||||
// generators somewhere in the call stack, then the result is a chain of obligations.
|
||||
//
|
||||
// Given a `async fn` A that calls a `async fn` B which captures a non-send type and that
|
||||
// Given an `async fn` A that calls an `async fn` B which captures a non-send type and that
|
||||
// future is passed as an argument to a function C which requires a `Send` type, then the
|
||||
// chain looks something like this:
|
||||
//
|
||||
|
|
|
@ -62,7 +62,7 @@ enum ProjectionTyCandidate<'tcx> {
|
|||
/// Bounds specified on an object type
|
||||
Object(ty::PolyProjectionPredicate<'tcx>),
|
||||
|
||||
/// From a "impl" (or a "pseudo-impl" returned by select)
|
||||
/// From an "impl" (or a "pseudo-impl" returned by select)
|
||||
Select(Selection<'tcx>),
|
||||
}
|
||||
|
||||
|
@ -1011,7 +1011,7 @@ fn prune_cache_value_obligations<'a, 'tcx>(
|
|||
/// Note that we used to return `Error` here, but that was quite
|
||||
/// dubious -- the premise was that an error would *eventually* be
|
||||
/// reported, when the obligation was processed. But in general once
|
||||
/// you see a `Error` you are supposed to be able to assume that an
|
||||
/// you see an `Error` you are supposed to be able to assume that an
|
||||
/// error *has been* reported, so that you can take whatever heuristic
|
||||
/// paths you want to take. To make things worse, it was possible for
|
||||
/// cycles to arise, where you basically had a setup like `<MyType<$0>
|
||||
|
|
|
@ -24,7 +24,7 @@ impl<'tcx> super::QueryTypeOp<'tcx> for ImpliedOutlivesBounds<'tcx> {
|
|||
) -> Fallible<CanonicalizedQueryResponse<'tcx, Self::QueryResponse>> {
|
||||
// FIXME this `unchecked_map` is only necessary because the
|
||||
// query is defined as taking a `ParamEnvAnd<Ty>`; it should
|
||||
// take a `ImpliedOutlivesBounds` instead
|
||||
// take an `ImpliedOutlivesBounds` instead
|
||||
let canonicalized = canonicalized.unchecked_map(|ParamEnvAnd { param_env, value }| {
|
||||
let ImpliedOutlivesBounds { ty } = value;
|
||||
param_env.and(ty)
|
||||
|
|
|
@ -257,7 +257,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
ImplSourceBuiltinData { nested: obligations }
|
||||
}
|
||||
|
||||
/// This handles the case where a `auto trait Foo` impl is being used.
|
||||
/// This handles the case where an `auto trait Foo` impl is being used.
|
||||
/// The idea is that the impl applies to `X : Foo` if the following conditions are met:
|
||||
///
|
||||
/// 1. For each constituent type `Y` in `X`, `Y : Foo` holds
|
||||
|
|
|
@ -149,7 +149,7 @@ pub(super) fn specializes(tcx: TyCtxt<'_>, (impl1_def_id, impl2_def_id): (DefId,
|
|||
let penv = tcx.param_env(impl1_def_id);
|
||||
let impl1_trait_ref = tcx.impl_trait_ref(impl1_def_id).unwrap();
|
||||
|
||||
// Create a infcx, taking the predicates of impl1 as assumptions:
|
||||
// Create an infcx, taking the predicates of impl1 as assumptions:
|
||||
tcx.infer_ctxt().enter(|infcx| {
|
||||
// Normalize the trait reference. The WF rules ought to ensure
|
||||
// that this always succeeds.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue